Add testing infrastructure and basic Webdriver tests #20
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: Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Set up Firefox Nightly | |
| uses: browser-actions/setup-firefox@v1 | |
| with: | |
| firefox-version: latest-nightly | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: xvfb-run --auto-servernum npm test | |
| env: | |
| FIREFOX_BINARY: /opt/hostedtoolcache/firefox/latest-nightly/x64/firefox | |
| DISPLAY: :99 | |
| - name: Upload screenshots on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-screenshots | |
| path: test/screenshots/ | |
| if-no-files-found: ignore |