Skip to content

install prettier and run formatting #87

install prettier and run formatting

install prettier and run formatting #87

Workflow file for this run

name: End-to-end tests
on: push
jobs:
install:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache node modules and .next cache
uses: actions/cache@v4
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Build Next.js app
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: npm run build
- name: Cypress install
uses: cypress-io/github-action@v6
with:
runTests: false
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
cypress-run:
runs-on: ubuntu-22.04
needs: install
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: npm ci
- name: Build Next.js app
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: npm run build
- name: Verify .next contents before starting
run: ls -la .next
- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: npm run start
browser: chrome
env:
TZ: 'America/Denver'
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
POSTGRES_URL: ${{ secrets.POSTGRES_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}