Weekly matrix workflow #969
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
| on: | |
| schedule: | |
| - cron: "0 0 * * 1" | |
| name: "Weekly matrix workflow" | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test_matrix: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| specs: | |
| [ | |
| "datasource", | |
| "interface", | |
| "path", | |
| "batch-jberet", | |
| "core-management", | |
| "deployment-scanner", | |
| "distributable-web", | |
| "ee", | |
| "ejb", | |
| "elytron", | |
| "elytron-oidc-client", | |
| "health", | |
| "io", | |
| "jmx", | |
| "jpa", | |
| "jsf", | |
| "mail", | |
| "metrics", | |
| "micrometer", | |
| "microprofile-lra", | |
| "opentelemetry", | |
| "runtime", | |
| "security-manager", | |
| "system-property", | |
| "transaction", | |
| "weld", | |
| "homepage", | |
| "smoke", | |
| "update-manager", | |
| "undertow", | |
| ] | |
| exclude: | |
| - specs: "update-manager" | |
| name: "Run tests" | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - name: "Checkout project" | |
| uses: actions/checkout@v4 | |
| - name: "Setup NodeJS" | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: "Setup JDK" | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "adopt" | |
| java-version: "17" | |
| - name: Install Chrome | |
| uses: browser-actions/setup-chrome@v1 | |
| with: | |
| chrome-version: stable | |
| - name: Install Firefox | |
| uses: browser-actions/setup-firefox@v1 | |
| with: | |
| firefox-version: "latest-esr" | |
| - name: "Check docker status" | |
| run: "systemctl status docker" | |
| - name: "Run npm install" | |
| run: 'npm install --ignore-scripts --before="$(date -d ''7 days ago'' --iso-8601=seconds)"' | |
| - name: "Install Cypress binary" | |
| run: "npx cypress install" | |
| - name: "Run compile" | |
| run: "npm run compile" | |
| - name: "Download resources" | |
| run: "npm run resources" | |
| - name: "Run test(s)" | |
| run: "npm run test:compiled -- --browser=chrome --specs=packages/testsuite/cypress/e2e/${{ matrix.specs }}/*.cy.ts" | |
| - name: "Archive test report(s) and video(s)" | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "${{ github.run_id}}-${{ strategy.job-index }}-artifacts" | |
| path: | | |
| results | |
| packages/testsuite/cypress/videos | |
| process_report: | |
| name: "Collect results & deploy GH pages" | |
| if: ${{ !cancelled() }} | |
| needs: test_matrix | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Download artifacts" | |
| uses: actions/download-artifact@v4 | |
| - name: "Setup NodeJS" | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: "Install necessary tools" | |
| run: npm install -g copyfiles gh-pages@3.0.0 mochawesome-merge mochawesome-report-generator | |
| - name: "List downloaded artifacts" | |
| run: find . -name "*.json" -path "*/results/*" | head -50 | |
| - name: "Generate Mochawesome Report" | |
| run: mochawesome-merge "./*-artifacts/results/packages/testsuite/cypress/e2e/*.json" > mochawesome.json | |
| - name: "Copy video assets" | |
| run: copyfiles -u 3 "./*-artifacts/packages/testsuite/cypress/videos/*.mp4" mochawesome-report/assets/videos | |
| - name: "Create GH Pages content" | |
| run: marge mochawesome.json -f index.html | |
| - name: "Get time info" | |
| uses: josStorer/get-current-time@v2 | |
| id: current-time | |
| - name: "Publish GH Pages" | |
| run: | | |
| gh-pages -r https://git:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git -d mochawesome-report -f -u "github-actions-bot <support+actions@github.com>" -m "${{ steps.current-time.outputs.readableTime }}" |