-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (50 loc) · 1.18 KB
/
main.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
50
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
format-lint:
name: Automatically format and lint code
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install packages
run: npm ci
- name: Prettier
run: npm run format
- name: Lint
run: npm run lint
run-e2e-tests:
name: Runs Cypress E2E tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install packages
run: npm ci
- name: Cypress run
uses: cypress-io/github-action@v5
with:
build: npm run build
start: npm run e2e:headless
wait-on: http://localhost:3000
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
run-component-tests:
name: Runs Cypress component tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install packages
run: npm ci
- name: Build
run: npm run build
- name: Cypress run
run: npm run component:headless
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}