Merge pull request #292 from HackBeanpot/AJ-fix-dropdown-names #375
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 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main, production ] | |
jobs: | |
cypress-tests: | |
name: E2E Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install | |
uses: bahmutov/npm-install@v1 | |
- run: cp .env.example .env | |
- name: Start Containers | |
run: yarn dev:db:up | |
- name: Build | |
run: yarn build | |
- name: Cypress run | |
uses: cypress-io/github-action@v2 | |
with: | |
start: yarn start | |
wait-on: "http://localhost:3000" | |
browser: chrome | |
# command-prefix: "yarn run percy exec" | |
env: | |
EMAIL_SERVER_USER: ${{ secrets.EMAIL_SERVER_USER }} | |
EMAIL_SERVER_PASSWORD: ${{ secrets.EMAIL_SERVER_PASSWORD }} | |
EMAIL_SERVER_HOST: ${{ secrets.EMAIL_SERVER_HOST }} | |
EMAIL_SERVER_PORT: ${{ secrets.EMAIL_SERVER_PORT }} | |
# CYPRESS_USE_LIVE_API: true | |
# CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
# PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# after the test run completes, store videos and any screenshots | |
# NOTE: screenshots will be generated only if E2E test failed | |
- name: Upload Screenshots | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
# Test run video was always captured, so always upload (implicit means only on success) | |
- name: Upload Videos | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: cypress-videos | |
path: cypress/videos |