-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (71 loc) · 1.98 KB
/
Copy pathci.yml
File metadata and controls
79 lines (71 loc) · 1.98 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
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
# Events that trigger this workflow
on: [push, pull_request]
jobs:
lint:
name: Lint source code
runs-on: ubuntu-latest
env:
CI: true
steps:
- name: Checkout 📥
uses: actions/checkout@v3.3.0
- name: Setup Node 💿
uses: actions/setup-node@v3.6.0
with:
node-version: 14
cache: 'npm'
- name: Install development dependencies 📚
run: npm ci
- name: Check code style 📑
run: npm run style:ci
- name: Run Linter 📑
run: npm run lint
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['10', '12', '14']
name: Build on Node v${{ matrix.node }}
env:
CI: true
steps:
- name: Checkout 📥
uses: actions/checkout@v3.3.0
- name: Setup Node 💿
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install development dependencies 📚
run: npm ci
- name: Check file styles and formattings ✨
run: npm run style:ci
- name: Build package 🛠️
run: npm run build
- name: Upload build artifact 📤
uses: actions/upload-artifact@v3.1.2
with:
name: build-${{ github.run_number }}
path: index.js
retention-days: 7
test:
name: Test module
runs-on: ubuntu-latest
steps:
- name: Checkout 📥
uses: actions/checkout@v3.3.0
- name: Setup Node 💿
uses: actions/setup-node@v3.6.0
with:
node-version: 14
cache: 'npm'
- name: Install development dependencies 📚
run: npm ci
- name: Run unit tests and generate coverage 🛃
run: npm run test
- name: Upload coverage report to Coveralls
if: ${{ github.actor != 'dependabot[bot]' }}
uses: coverallsapp/github-action@v2.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}