generated from bed-and-breakfast/templates-open-source
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (91 loc) · 2.88 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
80
81
82
83
84
85
86
87
88
89
90
91
name: CI
'on':
push: null
pull_request: null
jobs:
commit-check:
name: Check Conventional Commit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check Conventional Commit
uses: webiny/[email protected]
markdown-link-check:
name: Check Markdown Links
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: ./.github/actions/ci-node-setup
with:
node-version-file: .nvmrc
- name: Build
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build
path: lib
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: ./.github/actions/ci-node-setup
with:
node-version-file: .nvmrc
- name: Lint
run: npm run lint
- name: Format
run: npm run format
test:
name: Test (Node ${{ matrix.version }})
runs-on: ubuntu-latest
strategy:
matrix:
version:
- 18
- lts/*
- latest
include:
- version: 18
name: 18
- version: lts/*
name: lts
- version: latest
name: latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node (${{ matrix.version }})
uses: ./.github/actions/ci-node-setup
with:
node-version: ${{ matrix.version }}
- name: Test (With Coverage)
run: npm run test:coverage
- name: Upload test artifacts
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results-${{ matrix.name }}
path: test/junit.xml
- name: Upload coverage artifacts
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-coverage-${{ matrix.name }}
path: coverage/cobertura-coverage.xml