-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.12 KB
/
ci.yml
File metadata and controls
40 lines (39 loc) · 1.12 KB
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
name: CI
on:
push:
branches-ignore:
- main
pull_request:
jobs:
main:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- uses: actions/checkout@v3
name: Checkout [${{ github.ref_name }}]
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm ci
- run: npm run build
- run: npm run test --ci --coverage --maxWorkers=2
pr:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm ci
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- run: npm run build
- run: npm run test --ci --coverage --maxWorkers=2
- run: npm run lint
- run: npm run prettier