ManagementPortal 0.8.4 EOL #97
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Continuous integration, including test and integration test | |
name: Pre-release | |
# Run in master and dev branches and in all pull requests to those branches | |
on: | |
push: | |
branches: [ "release-*" ] | |
release: | |
types: [ published ] | |
jobs: | |
# Build and test the code | |
integration: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=.yarn/cache" >> $GITHUB_OUTPUT | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-rc-node-${{ hashFiles('**/build.gradle', '**/gradle.properties', '**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-rc-node- | |
${{ runner.os }}-node- | |
- name: Install Yarn dependencies | |
run: yarn install | |
- name: Yarn build | |
run: yarn build:prod | |
- name: Yarn check | |
run: yarn test | |
# Compile the code | |
- name: Compile java | |
run: ./gradlew assemble | |
- name: End to end tests | |
id: e2e | |
run: | | |
cp src/test/resources/config/keystore.p12 src/main/resources/config/keystore.p12 | |
./gradlew bootRun &>mp.log </dev/null & | |
yarn run wait-for-managementportal | |
./gradlew generateOpenApiSpec | |
yarn e2e | |
./gradlew --stop | |
- name: Upload screenshots of failed e2e tests | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
path: src/test/javascript/e2e/cypress/screenshots | |
if-no-files-found: ignore | |
retention-days: 5 | |
- name: Generate github pages | |
run: ./gradlew ghPages | |
if: startsWith(github.ref, 'refs/tags/') | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |