-
Notifications
You must be signed in to change notification settings - Fork 5
106 lines (89 loc) · 3.18 KB
/
continuous-integration.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Continuous Integration
on:
push:
branches: [main, beta]
pull_request:
branches: [main]
env:
HUSKY: 0
jobs:
sans-sourcemaps:
name: sans sourcemaps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# only need latest here as none of the steps below test the actual output
- name: setup node.js
uses: actions/[email protected]
with:
node-version: latest
cache: yarn
- run: yarn install --immutable
- run: yarn format
- run: yarn generate
- run: yarn compile
- run: yarn lint
- run: yarn docs
- name: check git is clean
run: 'git add . && git diff-index --quiet HEAD || (git reset --quiet && echo "Error: changed files" && git status --porcelain && exit 1)'
with-sourcemaps:
name: with sourcemaps (node ${{ matrix.node-version}})
needs: sans-sourcemaps
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20]
steps:
- uses: actions/checkout@v4
- name: setup node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --immutable
- run: yarn generate
- run: yarn compile:map
- run: yarn test
- name: check git is clean
run: 'git add . && git diff-index --quiet HEAD || (git reset --quiet && echo "Error: changed files" && git status --porcelain && exit 1)'
- name: upload test results
uses: actions/upload-artifact@v3
with:
name: test results
path: |
packages/postdfm/results/jest/report.xml
packages/@postdfm/ast/results/jest/report.xml
packages/@postdfm/ast2dfm/results/jest/report.xml
packages/@postdfm/dfm2ast/results/jest/report.xml
packages/@postdfm/plugin/results/jest/report.xml
packages/@postdfm/transform/results/jest/report.xml
- name: upload postdfm code coverage
uses: codecov/codecov-action@v3
with:
flags: postdfm
file: packages/postdfm/results/lcov/coverage.info
- name: upload @postdfm/ast code coverage
uses: codecov/codecov-action@v3
with:
flags: "@postdfm/ast"
file: packages/@postdfm/ast/results/lcov/coverage.info
- name: upload @postdfm/ast2dfm code coverage
uses: codecov/codecov-action@v3
with:
flags: "@postdfm/ast2dfm"
file: packages/@postdfm/ast2dfm/results/lcov/coverage.info
- name: upload @postdfm/dfm2ast code coverage
uses: codecov/codecov-action@v3
with:
flags: "@postdfm/dfm2ast"
file: packages/@postdfm/dfm2ast/results/lcov/coverage.info
- name: upload @postdfm/plugin code coverage
uses: codecov/codecov-action@v3
with:
flags: "@postdfm/plugin"
file: packages/@postdfm/plugin/results/lcov/coverage.info
- name: upload @postdfm/transform code coverage
uses: codecov/codecov-action@v3
with:
flags: "@postdfm/transform"
file: packages/@postdfm/transform/results/lcov/coverage.info