Skip to content

fix: PlayFootball @id #55

fix: PlayFootball @id

fix: PlayFootball @id #55

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: Install
run: npm ci
- name: Test
run: npm test
- 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/