-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (61 loc) · 1.81 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20.10.0
- name: Create .env file
run: echo "VITE_TOKEN=${{ secrets.VITE_TOKEN }}" > .env
- name: Install dependencies
run: npm install
- name: Lint with ESLint
run: npm run lint
- name: Format with Prettier
run: npm run format
- name: Run tests with Cypress on Chrome
uses: cypress-io/github-action@v6
with:
start: npm run dev
browser: chrome
- name: Run tests with Cypress on Firefox
uses: cypress-io/github-action@v6
with:
start: npm run dev
browser: firefox
- name: Upload Cypress Screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots
path: cypress/screenshots/**/*
- name: Upload Cypress Videos
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-videos
path: cypress/videos/**/*
- name: Generate code coverage report
run: npm run coverage
- name: Upload code coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
fail_ci_if_error: true
verbose: true
- name: Upload code coverage report to Code Climate
uses: paambaati/codeclimate-action@v8.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run coverage