-
Notifications
You must be signed in to change notification settings - Fork 21
67 lines (52 loc) · 1.65 KB
/
test-live-uk.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
name: Test-uk-live
on:
pull_request:
push:
branches: [main]
schedule:
- cron: '0 14 * * 3'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeLaGuardo/setup-clojure@master
with:
cli: latest
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/deps.edn') }}
restore-keys: ${{ runner.os }}-m2
- name: Install dependencies
run: clojure -P -M:test
- name: Compilation check
run: clojure -M:dev:check
- name: Create TRUD cache directory
run: mkdir download
- name: Write out TRUD API key from secrets
run: echo ${{ secrets.TRUD_API_KEY }} >> api-key.txt
- name: Cache database
id: cache-db
uses: actions/cache@v3
with:
path: snomed.db
key: ${{ github.sha }}-uk-clinical-db
- name: Install latest distributions for the UK
if: steps.cache-db.outputs.cache-hit != 'true'
run: clojure -M:run --db snomed.db install uk.nhs/sct-clinical --api-key api-key.txt --cache-dir download
- name: Remove downloaded files
run: rm -rf download
- name: Index database
if: steps.cache-db.outputs.cache-hit != 'true'
run: clojure -M:run --db snomed.db index
- name: Print status report
run: clojure -M:run --db snomed.db status
- name: Clojure tests
run: clojure -M:test