545e421423
Github action CI workflows added for webdriver tests.
I've also refactored the `./scripts/e2e-*` scripts. These scripts were
somewhat unique compared to the other scripts. They are now more inline
with the other scripts in that directory and run via
```
% yarn e2e --help
Usage: yarn e2e <command> [options]
Commands:
yarn e2e serve start test server
yarn e2e test:ci [env] runner for CI (github-actions)
yarn e2e test:local run webdriver tests locally
yarn e2e test:browserstack run webdriver tests on browserstack
yarn e2e selenium:grid start selenium grid (test linux)
Options:
--help Show help [boolean]
--version Show version number [boolean]
```
I've also added an experimental linux runner see
2cca4ddb77/e2e/README.md (L320-L333)
### Change Type
- [x] `tests` — Changes to any testing-related code only (will not
publish a new version)
### Release Notes
- Github action CI workflows added for webdriver tests
- Refactored e2e test runner
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: Webdriver checks
|
|
|
|
on:
|
|
merge_group:
|
|
pull_request:
|
|
branches: [main, production]
|
|
push:
|
|
branches: [main, production]
|
|
|
|
jobs:
|
|
test:
|
|
name: 'test/standalone-${{ matrix.browser }} (${{ matrix.os }})'
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest-16-cores-open]
|
|
node-version: [16]
|
|
browser: [chrome]
|
|
browser-version: ['111.0']
|
|
|
|
container:
|
|
image: node:${{ matrix.node-version }}
|
|
options: --network-alias testhost
|
|
volumes:
|
|
- /home/runner/work/_temp/e2e:/home/runner/work/_temp/e2e
|
|
|
|
services:
|
|
selenium:
|
|
image: selenium/standalone-${{ matrix.browser }}:${{ matrix.browser-version }}
|
|
ports:
|
|
- 4444:4444
|
|
options: --shm-size=2gb
|
|
volumes:
|
|
- /home/runner/work/_temp/e2e/:/home/seluser/files
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: true
|
|
|
|
- name: Setup Node.js environment
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'yarn'
|
|
cache-dependency-path: 'public-yarn.lock'
|
|
|
|
- name: Enable corepack
|
|
run: corepack enable
|
|
|
|
- name: Install dependencies
|
|
run: yarn
|
|
|
|
- run: DOCKER_HOST=selenium yarn e2e test:ci local
|
|
env:
|
|
CI: true
|
|
DOWNLOADS_DIR: /home/runner/work/_temp/e2e/
|
|
BROWSER: ${{ matrix.browser }}
|
|
TEST_URL: "https://testhost:5421"
|
|
GH_EVENT_NAME: ${{ github.event_name }}
|
|
GH_PR_NUMBER: ${{ github.pull_request.number }}
|
|
|
|
|