-
Notifications
You must be signed in to change notification settings - Fork 51
89 lines (79 loc) · 2.66 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Integration tests
on:
pull_request:
push:
branches:
- 'main'
- '*-release'
env:
DATABASE_NAME: TestDatabase
DATABASE_USERNAME: TestUsername
DATABASE_PASSWORD: TestPassword
BUCKET_URL: https://ace-minio-1.loris.ca:9000
BUCKET_NAME: loris-rb-data
BUCKET_ACCESS_KEY: lorisadmin
BUCKET_SECRET_KEY: dmwCdAZJ=9HwMte
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Mount raisinbread data
run: |
sudo apt-get update
sudo apt-get install -y s3fs fuse kmod
echo "AAA"
sudo modprobe fuse
echo "BBB"
sudo mkdir /data-imaging
echo "CCC"
touch .passwd-s3fs
chmod 600 .passwd-s3fs
echo "DDD"
sudo echo ${{ env.BUCKET_ACCESS_KEY }}:${{ env.BUCKET_SECRET_KEY }} > .passwd-s3fs
echo "EEE"
sudo s3fs ${{ env.BUCKET_NAME }} /data-imaging -o passwd_file=.passwd-s3fs -o url=${{ env.BUCKET_URL }} -o use_path_request_style -o allow_other
echo "FFF"
sudo ls /data-imaging
echo "GGG"
- name: Check out LORIS-MRI
uses: actions/checkout@v4
- name: Clone the LORIS core repository
run: git clone https://github.com/aces/Loris.git ./test/Loris
- name: Overwrite Raisinbread SQL files
run: cp -f ./test/RB_SQL/*.sql ./test/Loris/raisinbread/RB_files/
- 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: |
DATABASE_NAME=${{ env.DATABASE_NAME }}
DATABASE_USER=${{ env.DATABASE_USERNAME }}
DATABASE_PASS=${{ env.DATABASE_PASSWORD }}
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
build-args: |
DATABASE_NAME=${{ env.DATABASE_NAME }}
DATABASE_USER=${{ env.DATABASE_USERNAME }}
DATABASE_PASS=${{ env.DATABASE_PASSWORD }}
BUCKET_URL=${{ env.BUCKET_URL }}
BUCKET_NAME=${{ env.BUCKET_NAME }}
BUCKET_ACCESS_KEY=${{ env.BUCKET_ACCESS_KEY }}
BUCKET_SECRET_KEY=${{ env.BUCKET_SECRET_KEY }}
tags: loris-mri
load: true
cache-from: type=gha,scope=loris-mri
allow: security.insecure
cache-to: type=gha,mode=max,scope=loris-mri
- name: Run integration tests
run: docker compose --file ./test/docker-compose.yml run mri pytest python/tests/integration