deactivate docker creation in github actions because results in depen… #86
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: Run tests and upload to docker hub | |
on: [push] | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# python-version: [3.8, 3.9] # too many calls to zenodo download -> request limit | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{matrix.python-version}} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{matrix.python-version}} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest Cython | |
pip install torch==1.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html | |
pip install . | |
- name: Run test script | |
run: ./tests.sh | |
shell: bash | |
- name: Build Docker image | |
run: docker build -t wasserth/tractseg_container:master -f Dockerfile_CPU . | |
- name: Check build dir | |
run: echo $(pwd) | |
- name: Run Docker image | |
run: docker run -v $(pwd)/examples:/data wasserth/tractseg_container:master TractSeg \-i /data/Diffusion.nii.gz -o /data/docker_test --raw_diffusion_input --single_orientation | |
- name: Test csd peaks | |
run: pytest -v tests/test_end_to_end.py::test_end_to_end::test_csd_peaks | |
- name: Test tractseg docker | |
run: pytest -v tests/test_end_to_end.py::test_end_to_end::test_tractseg_output_docker | |
# upload-dockerhub: | |
# runs-on: ubuntu-latest | |
# needs: run-tests | |
# if: success() && github.ref == 'refs/heads/master' | |
# strategy: | |
# matrix: | |
# python-version: [3.8] | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v1 | |
# with: | |
# username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v1 | |
# - name: Build and push | |
# uses: docker/build-push-action@v2 | |
# with: | |
# context: . | |
# file: ./Dockerfile_CPU | |
# push: true | |
# tags: ${{ secrets.DOCKER_HUB_USERNAME }}/tractseg_container:master |