-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (44 loc) · 1.57 KB
/
test-mappings.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
name: Test PROV-BFO Mapping Changes
on:
pull_request:
branches:
- 'main'
env:
cache-path: build/lib
artifacts-path: build/artifacts/
cache-key: build-cache-dependencies
jobs:
ontology_test:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Restore cached dependencies
id: restore-cache
uses: actions/cache/restore@v3
with:
path: ${{ env.cache-path }}
# TODO this should be a file with a list of dependencies, to check if it changes and retrigger the cache
#key: ${{ env-cache-key}}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ env.cache-key }}
# Run the main steps here
- name: Check for inconsistency with Reasoner
run: make -C src reason-edit
- name: Run automated tests and generate reports
run: make -C src test-edit
if: always()
# Save any artifact files produced even if tests fail
- name: Save artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ontology_test_results
path: ${{ env.artifacts-path }}
# Save cache even if tests fail and only if a cache wasn't restored
- name: Save dependencies to cache
id: save-cache
uses: actions/cache/save@v3
if: always() && steps.restore-cache.outputs.cache-hit != 'true'
with:
path: ${{ env.cache-path }}
key: ${{ runner.os }}-${{ env.cache-key }}