-
Notifications
You must be signed in to change notification settings - Fork 9
77 lines (63 loc) · 2.45 KB
/
validate-new-dataset.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
name: Validate New Dataset
on:
pull_request:
branches: [ master ]
jobs:
validate-new-dataset:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18
- name: Checkout PR branch
uses: actions/checkout@v2
with:
path: new
- name: Checkout master branch
uses: actions/checkout@v2
with:
ref: master
path: old
- name: Get new Dataset Site URL from PR (for singular.jsonld)
uses: openactive/data-catalog-compare-action@main
id: dataset
with:
new_json_file: './new/singular.jsonld'
old_json_file: './old/singular.jsonld'
- name: Get new Dataset Site URL from PR (for singular-preview.jsonld)
uses: openactive/data-catalog-compare-action@main
id: dataset-preview
with:
new_json_file: './new/singular-preview.jsonld'
old_json_file: './old/singular-preview.jsonld'
- name: Get new Dataset Site URL from PR (for singular-test.jsonld)
uses: openactive/data-catalog-compare-action@main
id: dataset-test
with:
new_json_file: './new/singular-test.jsonld'
old_json_file: './old/singular-test.jsonld'
- name: Checkout OpenActive Test Suite
uses: actions/checkout@v2
if: ${{ steps.dataset.outputs.url || steps.dataset-preview.outputs.url || steps.dataset-test.outputs.url }}
with:
repository: openactive/openactive-test-suite
path: tests
- name: Install OpenActive Test Suite
run: npm install
if: ${{ steps.dataset.outputs.url || steps.dataset-preview.outputs.url || steps.dataset-test.outputs.url }}
working-directory: tests
- name: Validate new dataset
run: npm run validate-feeds ${{ steps.dataset.outputs.url || steps.dataset-preview.outputs.url || steps.dataset-test.outputs.url }}
if: ${{ steps.dataset.outputs.url || steps.dataset-preview.outputs.url || steps.dataset-test.outputs.url }}
env:
FORCE_COLOR: 1
NODE_CONFIG: |
{"broker": {"outputPath": "../../results/"}}
working-directory: tests
- name: Upload validation results as artifact upon failure
uses: actions/upload-artifact@v2
if: ${{ failure() && (steps.dataset.outputs.url || steps.dataset-preview.outputs.url || steps.dataset-test.outputs.url) }}
with:
name: validation-results
path: ./tests/results/