-
Notifications
You must be signed in to change notification settings - Fork 51
60 lines (52 loc) · 1.84 KB
/
integration.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
name: Integration tests
on:
pull_request:
push:
branches:
- 'main'
- '*-release'
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Check out LORIS-MRI
uses: actions/checkout@v4
- name: Clone the LORIS core repository
run: git clone https://github.com/aces/Loris.git /tmp/Loris
- name: Import database files
run: |
mkdir -p ./test/database
mkdir -p ./test/database/SQL
mkdir -p ./test/database/raisinbread/RB_files
mkdir -p ./test/database/raisinbread/instruments/instrument_sql
mkdir -p ./test/database/test/test_instrument
cp -r /tmp/Loris/SQL/* ./test/database/SQL
cp -r ./test/RB_SQL/* ./test/database/raisinbread/RB_files
cp -r -n /tmp/Loris/raisinbread/RB_files/* ./test/database/raisinbread/RB_files
cp -r /tmp/Loris/raisinbread/instruments/instrument_sql/* ./test/database/raisinbread/instruments/instrument_sql
cp -r /tmp/Loris/test/test_instrument/testtest.sql ./test/database/test/test_instrument/testtest.sql
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker database image
uses: docker/build-push-action@v6
with:
context: .
file: ./test/db.Dockerfile
build-args: |
BASE_DIR=/app/
tags: loris-db
load: true
cache-from: type=gha,scope=loris-db
cache-to: type=gha,scope=loris-db
- name: Build Docker MRI image
uses: docker/build-push-action@v6
with:
context: .
file: ./test/mri.Dockerfile
tags: loris-mri
load: true
cache-from: type=gha,scope=loris-mri
cache-to: type=gha,scope=loris-mri
- name: Run integration tests
run: docker compose --file ./test/docker-compose.yml run mri pytest python/tests/integration