Skip to content

Commit

Permalink
separate browser testings
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 committed Aug 16, 2024
1 parent dda4b57 commit 3e3ffa6
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions .github/workflows/test_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,46 @@ jobs:
working-directory: web
run: npm test

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: web-build-${{ runner.os }}-node${{ matrix.node_version }}
path: web/packages/selfhosted/dist # TODO: maybe core too?

browser-tests:
needs: build
if: needs.changes.outputs.should_run == 'true'
name: Test ${{ matrix.browser }} / Node.js ${{ matrix.node_version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node_version: ["20", "22"]
os: [ubuntu-22.04, windows-latest] # TODO: Don't run browser tests on Windows because it's flaky for unknown reasons. :-(
browser: ["chrome", "firefox", "edge"]

steps:
- uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: npm
cache-dependency-path: web/package-lock.json

- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: web-build-${{ runner.os }}-node${{ matrix.node_version }}

- name: Run browser-based tests
# Don't run browser tests on Windows because it's flaky for unknown reasons. :-(
if: runner.os == 'Linux'
working-directory: web
run: npm run wdio -- --headless --chrome --firefox --edge
shell: bash -l {0}
run: |
npm ci
npm run build
npm run wdio -- --headless --${{ matrix.browser }}
check-required:
needs: changes
Expand Down

0 comments on commit 3e3ffa6

Please sign in to comment.