-
Notifications
You must be signed in to change notification settings - Fork 14
42 lines (32 loc) · 958 Bytes
/
validate.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
name: Validate
on:
pull_request:
branches: [ main ]
env:
HUSKY: 0
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.0.0
cache: npm
- name: Install dependencies
run: npm install
- name: Fetch other branches for commitlint
run: git fetch --prune --unshallow
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Validate code style
run: npm run lint
- name: Test
run: npm run test:cov
- name: Upload Test Coverage
uses: codecov/codecov-action@v4
with:
files: ./ts/coverage
token: ${{ secrets.CODECOV_TOKEN }}