Inline Cypress linting & UDS test #2815
Workflow file for this run
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: E2E CI | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - 'main/IDEs/**' | |
| - 'main/webapp/modules/core/langs/**' | |
| - 'extensions/database/module/langs/**' | |
| - 'extensions/pc-axis/module/langs/**' | |
| - 'extensions/wikibase/module/langs/**' | |
| branches: | |
| - master | |
| permissions: read-all | |
| jobs: | |
| prepare_e2e_test_matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Enable corepack for Yarn | |
| run: corepack enable | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Set up caching manually so we can cache Cypress binary | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/cache | |
| ~/.cache | |
| main/webapp | |
| **/node_modules | |
| !~/cache/exclude | |
| server/classes | |
| server/target/lib | |
| extensions | |
| modules | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn | |
| - name: Install test dependencies | |
| run: | | |
| cd ./main/tests/cypress | |
| yarn install --immutable | |
| yarn cypress install --force | |
| yarn cypress verify | |
| - name: Check Cypress test formatting and linting (4 sec.) | |
| working-directory: main/tests/cypress | |
| run: yarn lint | |
| - name: Set up Java 21 | |
| uses: actions/setup-java@v5.7.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| cache: 'maven' | |
| - name: Build OpenRefine | |
| run: | | |
| ./refine build | |
| du -m -s ~/.cache | |
| du -m -s main/webapp | |
| find . -name node_modules -exec du -m -s {} \; | |
| du -m -s server/classes | |
| du -m -s server/target/lib | |
| du -m -s extensions | |
| du -m -s modules | |
| - name: Test Unix Domain Socket connectivity (10 sec.) | |
| run: | | |
| ./refine uds_tests | |
| - id: set-matrix | |
| run: npm install glob && node main/tests/cypress/build-test-matrix.js >> $GITHUB_OUTPUT | |
| env: | |
| browsers: chrome | |
| e2e_test: | |
| name: e2e_test ${{ matrix.specs.group }} | |
| needs: prepare_e2e_test_matrix | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: ${{fromJSON(needs.prepare_e2e_test_matrix.outputs.matrix)}} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Java 21 | |
| uses: actions/setup-java@v5.7.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| cache: 'maven' | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Restore Tests dependency cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/cache | |
| ~/.cache | |
| /home/runner/.cache | |
| main/webapp | |
| **/node_modules | |
| !~/cache/exclude | |
| server/classes | |
| server/target/lib | |
| extensions | |
| modules | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn | |
| - name: Install test dependencies | |
| run: | | |
| cd ./main/tests/cypress | |
| yarn install --immutable | |
| yarn cypress install --force | |
| yarn cypress verify | |
| - name: Test with Cypress on ${{ matrix.browser }} | |
| run: | | |
| echo REFINE_MIN_MEMORY=1400M >> ./refine.ini | |
| echo REFINE_MEMORY=4096M >> ./refine.ini | |
| ./refine e2e_tests | |
| env: | |
| CYPRESS_BROWSER: ${{ matrix.browser }} | |
| CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
| CYPRESS_PROJECT_ID: ${{ vars.CYPRESS_PROJECT_ID }} | |
| CYPRESS_CI_BUILD_ID: '${{ github.run_id }}' | |
| CYPRESS_SPECS: ${{ matrix.specs.paths }} | |
| CYPRESS_GROUP: ${{ matrix.specs.group }} |