forked from zazuko/cube-link
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (72 loc) · 2.43 KB
/
test.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
name: Test validation
on: [push, pull_request]
jobs:
check-constraint:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Patch rdf-loader-code
shell: sh
run: sed -i 's/return resolve(base, url.pathname)/return pathToFileURL(resolve(base, url.pathname)).toString()/' node_modules/rdf-loader-code/lib/iriResolve.js && sed -i "1i import { pathToFileURL } from 'url'" node_modules/rdf-loader-code/lib/iriResolve.js
- name: Run tests
shell: sh
run: ./test/check-observations.sh
- name: Show test results
if: ${{ always() }}
shell: sh
run: for file in test/observations/*.log ; do echo === $file === ; cat $file ; done
- name: Upload test results
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: test-observations
path: test
check-cube:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
profile:
- basic-cube-constraint
- standalone-constraint-constraint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Patch rdf-loader-code
shell: sh
run: sed -i 's/return resolve(base, url.pathname)/return pathToFileURL(resolve(base, url.pathname)).toString()/' node_modules/rdf-loader-code/lib/iriResolve.js && sed -i "1i import { pathToFileURL } from 'url'" node_modules/rdf-loader-code/lib/iriResolve.js
- name: Run tests
shell: sh
run: ./test/check-metadata.sh --profile=${{ matrix.profile }}
- name: Show test results
if: ${{ always() }}
shell: sh
run: for file in test/${{ matrix.profile }}/*.log ; do echo === $file === ; cat $file ; done
- name: Upload test results
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: test-${{ matrix.profile }}
path: test