-
Notifications
You must be signed in to change notification settings - Fork 15
55 lines (52 loc) · 1.22 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
name: CI
on:
pull_request:
push:
branches:
- main
schedule:
# At minute 0 past hour 0800 and 2000.
- cron: '0 8,20 * * *'
jobs:
commitlint:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
name: Commitlint
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Commitlint
uses: wagoid/commitlint-github-action@v6
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [ '18.x', '20.x', '22.x' ]
eslint: [ 8 ]
name: Node.js ${{ matrix.node }} with ESLint ${{ matrix.eslint }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install Dependencies
run: |
npm ci
npm install --no-save eslint@${{ matrix.eslint }}
env:
NODE_ENV: development
HUSKY: 0
- name: Unit Tests
run: npm run test:unit
env:
NODE_ENV: production
- name: Lockfile Lint Test
run: npm run test:lockfile
- name: Lint
run: npm run test:lint