Add playwright install to prepare script #140
Workflow file for this run
This file contains 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 | |
on: | |
push: | |
branches: | |
- rewrite | |
pull_request: | |
branches: | |
- rewrite | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
node-version: ['16.x', '18.x', '20.x'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install | |
run: npm ci | |
- name: Lint | |
if: matrix.node-version == '18.x' | |
run: npm run lint | |
- name: Prettier | |
if: matrix.node-version == '18.x' | |
run: npm run prettier:check | |
- name: Test | |
run: npm test | |
# N.B.: The selenium server cannot run as a GitHub Actions "service" as | |
# the tests need to mount local data into the container. | |
- name: Start Selenium Server | |
run: | | |
docker run -d -p 4444:4444 \ | |
--shm-size="2g" \ | |
--name selenium_server \ | |
-v ${PWD}:${PWD} \ | |
selenium/standalone-firefox:4.16.1-20231219 | |
- name: Integration | |
run: npm run test:integration | |
- name: Stop Selenium Server | |
if: always() | |
run: docker stop selenium_server && docker rm selenium_server |