Update Dockerfile #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/** |