-
Notifications
You must be signed in to change notification settings - Fork 6
79 lines (73 loc) · 1.66 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
name: CI
on:
pull_request:
branches:
- dev
- main
- 'feature/*'
push:
branches:
- dev
- main
- 'feature/*'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 16.0
- name: Install dependencies
run: npm install
- name: Run linters
uses: wearerequired/lint-action@v2
with:
eslint: true
prettier: true
prettier_dir: src/
eslint_dir: src/
eslint_extensions: js,ts
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 16.0
- name: Install dependencies
run: npm install
- name: Test
run: npm test
- name: Upload test coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /coverage/cobertura-coverage.xml
fail_ci_if_error: true
verbose: true
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 16.0
- name: Install dependencies
run: npm install
- name: Build
run: npm run build --if-present
branch-name:
runs-on: ubuntu-latest
name: Check branch name
steps:
- uses: deepakputhraya/action-branch-name@master
with:
regex: '\w+\/(?:feature-|hotfix-)?AR-\d+-.+'
ignore: main,dev