-
Notifications
You must be signed in to change notification settings - Fork 5
79 lines (61 loc) · 1.68 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:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
commitlint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lints Pull Request commits
uses: wagoid/commitlint-github-action@v5
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [16, 18, 20]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
services:
rabbitmq:
image: heidiks/rabbitmq-delayed-message-exchange
ports:
- 5672:5672
options:
--health-cmd "rabbitmq-diagnostics -q check_virtual_hosts"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: |
node --version
npm --version
- name: Install npm dependencies
run: npm ci --progress=false --loglevel=warn --ignore-scripts
- name: Type check
run: npm run typecheck
- name: Dry run of publishing
run: npm run publish:dev:dry
- name: Lint code
run: npm run lint
- name: Run tests
run: npm run coverage
- name: Run Coveralls
uses: coverallsapp/github-action@master
if: startsWith(matrix.node-version, '18.')
with:
github-token: ${{ secrets.GITHUB_TOKEN }}