Skip to main content

.github/workflows/test.yml

1name: Test
3on:
4 push:
5 branches:
6 - main
8 pull_request:
9 branches:
10 - main
12jobs:
13 test:
14 runs-on: ubuntu-latest
16 steps:
17 - uses: actions/checkout@v4
18 - uses: actions/setup-node@v4
20 # This is a crude test harness that checks the script is working correctly: it
21 # runs the script, and checks the generated files are created as expected.
22 - name: Run tests
23 run: |
24 node measure https://wellcomecollection.org/collections collections
26 ls out
27 if [ ! -f "out/collections.html" ]; then exit 1; fi
28 if [ ! -f "out/collections.json" ]; then exit 1; fi
30 node measure https://wellcomecollection.org/collections
32 ls out
33 if [ ! -f "out/export.html" ]; then exit 1; fi
34 if [ ! -f "out/export.json" ]; then exit 1; fi