forked from labsyspharm/UnMicst
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.37 KB
/
ci.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
name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker container
run: docker build -t unmicst:test .
# Cache test data to avoid repeated download
- uses: actions/cache@v3
id: cache-data
with:
path: |
~/data/exemplar-001-cycle6.ome.tif
key: testdata-2022-04-29
# Download test data only if no cache is present
- name: Test data download
if: steps.cache-data.outputs.cache-hit != 'true'
run: |
mkdir ~/data
cd ~/data
curl -f -o exemplar-001-cycle6.ome.tif https://mcmicro.s3.amazonaws.com/ci/exemplar-001-cycle6.ome.tif
- name: Test the container
run: |
cd ~/data
rm -f exemplar-001-cycle6_Probabilities_1.tif
rm -rf qc/
docker run -v "$PWD":/data unmicst:test /bin/bash -c "cd /data; \
python /app/unmicstWrapper.py --stackOutput --outputPath . exemplar-001-cycle6.ome.tif"
# If the action is successful, the output will be available as a downloadable artifact
- name: Upload processed result
uses: actions/upload-artifact@v2
with:
name: exemplar-001
path: |
~/data/exemplar-001-cycle6_Probabilities_1.tif
~/data/qc/**