Enforce selenium feature tests pass on committed files #2
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: run-features | |
run-name: Enforce selenium feature tests pass on committed files | |
on: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
run-features: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: password | |
POSTGRES_USER: cyf | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
cache: "npm" | |
- run: cp .env.example .env | |
- run: npm install | |
- run: npm run dev & | |
env: | |
NODE_ENV: test | |
TEST_DATABASE_URL: postgres://cyf:password@localhost:5432/cyf | |
- run: sleep 10 | |
- run: npm run test:features | |
env: | |
HEADLESS: true | |
NODE_ENV: test | |
TEST_DATABASE_URL: postgres://cyf:password@localhost:5432/cyf |