Merge pull request #112 from Roman-Supernova-PIT/u/cole/diaobj_kwargs #374
This file contains hidden or 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 SNAPPL Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| name: run snappl tests in docker container | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Dump docker logs on failure | |
| if: failure() | |
| uses: jwalton/gh-docker-logs@v2 | |
| - name: checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: run ruff | |
| uses: astral-sh/ruff-action@v3 | |
| - name: checkout photometry test data | |
| run: | | |
| cd .. | |
| git clone http://github.com/Roman-Supernova-PIT/photometry_test_data | |
| - name: log into github container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: cleanup | |
| run: | | |
| # try to save HDD space on the runner by removing some unneeded stuff (~8GB) | |
| # ref: https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 | |
| # (For some perverse reason, this step seems to take 1.5-2 minutes on github runners! | |
| # For that reason, this is commented out, for now. Uncomment it if we run into trouble.) | |
| df -h | |
| # echo "------" | |
| # sudo rm -rf /usr/share/dotnet | |
| # sudo rm -rf /opt/ghc | |
| # sudo rm -rf "/usr/local/share/boost" | |
| # sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
| # echo "------" | |
| # df -h | |
| - name: pull environment archive | |
| run: | | |
| cd .. | |
| git clone https://github.com/Roman-Supernova-PIT/environment.git | |
| - name: pull docker images | |
| run: | | |
| cd ../environment/test-docker-environment | |
| docker compose pull mailhog postgres webserver shell | |
| - name: run test | |
| run: | | |
| cd .. | |
| ls | |
| echo "--------" | |
| ls snappl | |
| echo "--------" | |
| cd environment/test-docker-environment | |
| docker compose up -d webserver shell | |
| docker compose exec shell bash -c 'cd /home/snappl && pip install -e .[test]' | |
| docker compose exec shell bash -c 'cd /home/snappl/snappl/tests && pytest -v' | |
| docker compose down -v |