-
Notifications
You must be signed in to change notification settings - Fork 15
112 lines (94 loc) · 2.65 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: CI
on:
push:
branches:
- "**"
pull_request:
jobs:
install-dependencies:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Use NodeJS 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: node_modules cache
uses: actions/cache@v4
with:
key: node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node_modules-
path: |
./node_modules
- name: Install dependencies
run: yarn
lint:
runs-on: ubuntu-22.04
needs: install-dependencies
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Use NodeJS 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: node_modules global cache restore
uses: actions/cache/restore@v4
with:
key: node_modules-${{ hashFiles('**/yarn.lock') }}
fail-on-cache-miss: true
path: |
./node_modules
- name: Run linting checks
run: yarn lint
format-check:
runs-on: ubuntu-22.04
needs: install-dependencies
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Use NodeJS 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: node_modules global cache restore
uses: actions/cache/restore@v4
with:
key: node_modules-${{ hashFiles('**/yarn.lock') }}
fail-on-cache-miss: true
path: |
./node_modules
- name: Run formatting checks
run: yarn format-check
test-coverage:
runs-on: ubuntu-22.04
needs: install-dependencies
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Use NodeJS 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: node_modules global cache restore
uses: actions/cache/restore@v4
with:
key: node_modules-${{ hashFiles('**/yarn.lock') }}
fail-on-cache-miss: true
path: |
./node_modules
- name: Run test coverage
run: yarn coverage
- name: Generate Code Coverage report
id: code-coverage
uses: ./
with:
barecheck-github-app-token: ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
barecheck-api-key: ${{ secrets.BARECHECK_API_KEY }}
lcov-file: "./coverage/lcov.info"
minimum-ratio: 0
send-summary-comment: true
show-annotations: "warning"
# app-name: "Barecheck"