GH actions: fix path to src code inside docker #3
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: consistency_test | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'cnn_lib/**' | |
- 'docker/**' | |
- '.github/**' | |
pull_request: | |
branches: | |
- '*' | |
paths: | |
- 'cnn_lib/**' | |
- 'docker/**' | |
- '.github/**' | |
jobs: | |
consistency-test: | |
name: build docker and run tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Download test data | |
run: | | |
pip install zenodo_get && \ | |
zenodo_get 7040177 -o /tmp/ && \ | |
7z x /tmp/venus_clouds_v1.0.7z -o/tmp/training_data && \ | |
rm /tmp/training_data/training_set_clouds_multiclass/s* | |
- name: Build docker | |
run: docker build docker/docker-cpu -t docker-cpu:1.0 | |
- name: test | |
run: | | |
docker run --rm -v /tmp:/tmp:rw -v ${GITHUB_WORKSPACE}/cnn-lib:/src:ro -e PYTHONPATH=/usr/local/lib/python3.6/dist-packages:/usr/local/lib/python3/dist-packages:/src --cpus=2 -m 20g docker-cpu:1.0 ls && \ | |
docker run --rm -v /tmp:/tmp:rw -v ${GITHUB_WORKSPACE}/cnn-lib:/src:ro -e PYTHONPATH=/usr/local/lib/python3.6/dist-packages:/usr/local/lib/python3/dist-packages:/src --cpus=2 -m 20g docker-cpu:1.0 ls / && \ | |
docker run --rm -v /tmp:/tmp:rw -v ${GITHUB_WORKSPACE}/cnn-lib:/src:ro -e PYTHONPATH=/usr/local/lib/python3.6/dist-packages:/usr/local/lib/python3/dist-packages:/src --cpus=2 -m 20g docker-cpu:1.0 ls /src | |
- name: pytest | |
run: | | |
docker run --rm -v /tmp:/tmp:rw -v ${GITHUB_WORKSPACE}/cnn-lib:/src:ro -e PYTHONPATH=/usr/local/lib/python3.6/dist-packages:/usr/local/lib/python3/dist-packages:/src --cpus=2 -m 20g docker-cpu:1.0 pytest src/test/consistency_test.py |