-
Notifications
You must be signed in to change notification settings - Fork 2
157 lines (150 loc) · 4.81 KB
/
ci.yaml
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: CI
on: push
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node:
- "18"
- "20"
package:
- base
- core
- cube
- csvw
- formats
- ftp
- graph-store
- http
- rdf
- s3
- sparql
- shacl
- validation
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npx c8 --all --src packages/${{ matrix.package }} -x "packages/!(${{ matrix.package }})" --reporter lcovonly --reporter text wsrun --no-prefix -p barnard59-${{ matrix.package }} -c test
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: barnard59-${{ matrix.package }}
type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npx wsrun -mc build
test-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run -w barnard59-test-e2e test
test-cli:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node:
- "18"
- "20"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- name: Compile TypeScript packages
run: npx wsrun -mc build --sourceMap
- run: npx c8 --all --src packages/cli -x "packages/!(cli)" --reporter lcovonly --reporter text wsrun --no-prefix -p barnard59 -c test
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: barnard59
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm ci
- run: npm run lint
ensure-manifests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm ci
- run: node .github/ensureManifests.js
smoke-test-cli:
strategy:
fail-fast: false
matrix:
env:
- os: ubuntu-latest
node: 20
- os: macos-latest
node: 20
- os: windows-latest
node: 20.12.1 # Pinned, because of https://github.com/approvals/Approvals.NodeJS/issues/176
runs-on: ${{ matrix.env.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.env.node }}
cache: npm
- run: npm ci
- run: npx barnard59 run test/e2e/definitions/file-loader.ttl
- run: npx barnard59 run test/e2e/definitions/foreach/with-handler.ttl
- run: npx barnard59 run test/e2e/definitions/foreach/with-variable.ttl --variable pattern="test/e2e/definitions/foreach/*"
- run: npx barnard59 run test/e2e/definitions/foreach/csv-duplicate.ttl --variable filename=test/e2e/data/test.csv
- run: npx barnard59 run test/e2e/definitions/world-clock/async.ttl
- run: npx barnard59 run test/e2e/definitions/world-clock/file.ttl
- run: npx barnard59 run test/e2e/definitions/world-clock/node.ttl
- run: npx barnard59 run test/e2e/definitions/code-imports/main.ttl
global-installation:
strategy:
fail-fast: false
matrix:
env:
- os: ubuntu-latest
node: 20
- os: macos-latest
node: 20
- os: windows-latest
node: 20.12.1 # Pinned, because of https://github.com/approvals/Approvals.NodeJS/issues/176
runs-on: ${{ matrix.env.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.env.node }}
cache: npm
- run: npm ci
- name: pack all
run: npm pack -ws
- run: npm install -g barnard59-*.tgz
if: matrix.env.os == 'ubuntu-latest' || matrix.env.os == 'macos-latest'
- run: cmd /c npm install -g (Get-ChildItem -Filter barnard59-*.tgz).FullName
if: matrix.env.os == 'windows-latest'
- run: which barnard59
- run: barnard59 --help
- run: barnard59 shacl validate --shapes test/support/pipeline-shapes.ttl < test/e2e/definitions/file-loader.ttl
if: matrix.env.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
- run: barnard59 shacl validate --shapes test/support/pipeline-shapes.ttl < test/e2e/definitions/file-loader.ttl
if: matrix.env.os == 'windows-latest'
shell: cmd