Update definitelyTyped #1808
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: Cypress Tests with Dependency and Artifact Caching | |
on: [push] | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-latest | |
container: cypress/browsers:node14.17.0-chrome88-ff89 | |
# Service containers to run with `cypress` | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres | |
# Provide the password for postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
id: yarn-build-cache | |
with: | |
path: | | |
node_modules | |
~/.cache/Cypress | |
build | |
key: ${{ runner.os }}-node_modules-build-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node_modules-build- | |
# Install NPM dependencies, cache them correctly | |
# and run all Cypress tests | |
- name: Cypress run | |
uses: cypress-io/github-action@v2 | |
with: | |
# Specify Browser since container image is compile with Firefox | |
browser: chrome | |
wait-on: yarn migrate | |
build: yarn build:prod | |
start: yarn start | |
env: | |
DB_HOST: postgres | |
DB_PORT: 5432 | |
DB_USERNAME: postgres | |
DB_PASSWORD: postgres | |
DB_DATABASE: postgres | |