fail test #465
This file contains hidden or 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
| name: Build Linux | |
| on: | |
| push: | |
| branches: [ "development/automated-ui-test" ] | |
| pull_request: | |
| branches: [ "development/automated-ui-test" ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Git Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'adopt' | |
| cache: maven | |
| - name: Install required packages | |
| run: sudo apt-get update && sudo apt-get install -y xvfb libgtk-3-0 | |
| - name: Start Xvfb | |
| run: | | |
| Xvfb :99 -screen 0 1024x768x24 & | |
| echo "Xvfb started" | |
| - name: Set DISPLAY environment variable | |
| run: echo "DISPLAY=:99" >> $GITHUB_ENV | |
| - name: Build with Maven | |
| run: mvn -B clean install -Plinux -Pci-build -Dno-native-profile -Dmaven.test.skip=true | |
| - name: Run headless test | |
| run: mvn test -Plinux -Pci-build -Dno-native-profile | |
| - name: Upload reference files and test results | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test resources | |
| path: | | |
| pdf-over-gui/src/test/resources/ | |
| - name: Describe current commit | |
| run: echo "commit_sha=${GITHUB_SHA::7}" >> $GITHUB_ENV | |
| - name: Remove Previous Build Artifacts | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const { owner, repo } = context.issue; | |
| (await github.rest.actions.listArtifactsForRepo({ owner, repo })).data.artifacts | |
| .filter(({ name }) => (name.startsWith('pdf-over-${{ github.event.pull_request.number || github.ref_name }}-') && name.endsWith('linux-x86_64'))) | |
| .forEach(({ id, name }) => { console.log('Deleting '+name+' ('+id+')'); github.rest.actions.deleteArtifact({ owner, repo, artifact_id: id }); }); | |
| - name: Set executable permissions | |
| run: chmod +x pdf-over-build/*.sh pdf-over-build/jre/bin/* | |
| - name: Tar bundle | |
| run: tar -C pdf-over-build -cvf pdf-over.tar ./ | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pdf-over-feature-automated-ui-test-${{ env.commit_sha }}-linux-x86_64 | |
| path: pdf-over.tar | |
| permissions: | |
| contents: read | |
| actions: write |