update tests to match updated implementation #1262
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: App tests | ||
on: | ||
push: | ||
paths: | ||
- 'app/**' | ||
- ".github/workflows/cypress.yml" | ||
- paths-ignore: | ||
- 'app/README.md' | ||
jobs: | ||
cypress: | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: ${{github.workspace}}/app | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: 'app/.nvmrc' | ||
cache: 'yarn' | ||
cache-dependency-path: app/yarn.lock | ||
- run: corepack enable | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
- name: Yarn cache | ||
uses: actions/cache@v3 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
working-directory: app | ||
run: | | ||
echo "yarn version: $(yarn --version)" | ||
yarn install --immutable | ||
- name: Cypress running on Electron | ||
uses: cypress-io/github-action@v5 | ||
with: | ||
working-directory: app | ||
install: false | ||
config-file: cypress.config.ts | ||
build: yarn build | ||
start: yarn start | ||
wait-on: 'http://localhost:3000' | ||
env: | ||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
# ? Not sure if I should be using the staging URL here... | ||
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL_STAGING }} | ||
# Recommended: pass the GitHub token lets this action correctly | ||
# determine the unique run id necessary to re-run the checks | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |