-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.29 KB
/
ci.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
51
52
53
name: CI
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
on:
pull_request:
types: [opened, synchronize]
issue_comment:
types: [created, deleted]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run install
run: npm install
- name: Run eslint
run: npm run lint
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.13.0
cache: "npm"
- name: Cypress run
uses: cypress-io/github-action@v5
with:
build: npm run build
start: npm start
browser: chrome
jest-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ArtiomTr/jest-coverage-report-action@v2
preview:
needs: [lint, cypress-run, jest-run]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Install
run: npm install
- name: Run Preview Deployment
run: npm run deploy:preview