|
1 |
| -# Installs MATLAB runtime R2020a and tests compiled SINGE for macOS on test data |
2 |
| -name: Install test macOS |
| 1 | +name: Install test SINGE |
3 | 2 |
|
4 | 3 | on: [push, pull_request]
|
5 | 4 |
|
6 | 5 | jobs:
|
7 |
| - build: |
| 6 | + # Builds and tests the SINGE Docker image, tests SINGE in a Docker container |
| 7 | + docker: |
| 8 | + name: Install test Docker |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - name: Checkout repository |
| 12 | + uses: actions/checkout@v2 |
| 13 | + # Pull from Docker Hub to use the cache |
| 14 | + # https://medium.com/mobileforgood/coding-tips-patterns-for-continuous-integration-with-docker-on-travis-ci-9cedb8348a62 |
| 15 | + # https://github.com/docker/build-push-action/issues/7 |
| 16 | + - name: Pull Docker image |
| 17 | + run: docker pull agitter/singe:tmp |
| 18 | + - name: Build Docker image |
| 19 | + uses: docker/build-push-action@v1 |
| 20 | + with: |
| 21 | + username: ${{ secrets.DOCKER_USERNAME }} |
| 22 | + password: ${{ secrets.DOCKER_PASSWORD }} |
| 23 | + path: . |
| 24 | + dockerfile: docker/Dockerfile |
| 25 | + repository: agitter/singe |
| 26 | + tags: tmp |
| 27 | + cache_froms: agitter/singe:tmp |
| 28 | + add_git_labels: true |
| 29 | + # Only push when running on the master branch |
| 30 | + push: ${{ github.ref == 'refs/heads/master' }} |
| 31 | + - name: Test SINGE |
| 32 | + run: | |
| 33 | + # Store the md5sums of the tracked source files before running tests in the Docker image |
| 34 | + # The Docker image does not have git installed |
| 35 | + md5sum $(git ls-tree -r HEAD --name-only | grep '.*\.m$') > current_code.md5 |
| 36 | + # Run SINGE tests in the built Docker image |
| 37 | + # The conda environment should be activated before running the bash script |
| 38 | + # See https://github.com/conda/conda/issues/7980 |
| 39 | + docker run -v $(pwd):/SINGE -w /SINGE --entrypoint "/bin/bash" agitter/singe:tmp -c "source ~/.bashrc; conda activate singe-test; tests/docker_test.sh" |
| 40 | + # Proof-of-concept of running SINGE in a high-throughput style |
| 41 | + # Can be moved to run in a parallel job |
| 42 | + bash tests/high_throughput_test.sh |
| 43 | + # Test standalone SINGE run through Docker |
| 44 | + bash tests/standalone_test.sh |
| 45 | + # Test standalone SINGE on a branching dataset |
| 46 | + bash tests/standalone_branching_test.sh |
| 47 | + # Confirm the hyperparameter generation script works |
| 48 | + cd scripts |
| 49 | + bash generate_hyperparameters.sh |
| 50 | + # Installs MATLAB runtime R2020a and tests compiled SINGE for macOS on test data |
| 51 | + macos: |
| 52 | + name: Install test macOS |
8 | 53 | # See available macOS software https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md
|
9 | 54 | runs-on: macos-latest
|
10 | 55 | env:
|
|
0 commit comments