-
Notifications
You must be signed in to change notification settings - Fork 447
47 lines (44 loc) · 1.23 KB
/
cypress.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Cypress Tests
on:
pull_request:
branches:
- main
- dev
paths:
- 'platform/**'
push:
branches:
- main
paths:
- 'platform/**'
jobs:
e2e:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
browser: [chrome]
node: [18, 20, 21]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install pnpm
run: npm install -g pnpm
- name: Write to .env
run: echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}\NEXT_PUBLIC_NO_TELEMETRY=true\nNEXT_PUBLIC_DEFAULT_REPO_PATH=$(pwd)\n" >> platform/.env
- name: Cypress run
if: ${{ !(matrix.os == 'ubuntu-latest' && matrix.browser == 'safari') }}
uses: cypress-io/github-action@v6
with:
build: pnpm run build
start: pnpm start
browser: ${{ matrix.browser }}
wait-on: 'http://localhost:4000' # Waits for above
record: true
working-directory: platform
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}