generated from freeCodeCamp/template
-
-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (46 loc) · 1.37 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
48
49
name: Cypress
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: create .env file (backend)
working-directory: ./publish-backend
run: cp .env.example .env
- name: install packages (backend)
working-directory: ./publish-backend
run: npm install
- name: create .env file (frontend)
working-directory: ./publish-frontend
run: cp sample.env.local .env.local
- name: install packages (frontend)
working-directory: ./publish-frontend
run: npm install
- name: Import strappi config
working-directory: ./publish-backend
run: |
docker compose up -d && wait
npm run cs export
echo "y"
- name: seed data
working-directory: ./publish-backend
env:
SEED_DATA: true
run: |
npm install
docker compose up -d
- name: Cypress run
uses: cypress-io/github-action@v6
with:
working-directory: ./publish-frontend
start: npm run develop
wait-on: 'http://localhost:3000, http://localhost:1337'
wait-on-timeout: 120
env: