Merge pull request #16 from Roman-Supernova-PIT/u/rknop/snpitjsonencoder #60
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 snpit_utils Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| name: run snpit_utils tests in docker container | |
| runs-on: ubuntu-latest | |
| env: | |
| COMPOSE_FILE: snpit_utils/tests/docker-compose.yaml | |
| steps: | |
| - name: Dump docker logs on failure | |
| if: failure() | |
| uses: jwalton/gh-docker-logs@v2 | |
| - name: checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: run ruff | |
| uses: astral-sh/ruff-action@v3 | |
| - 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 | |
| # ref: https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
| - name: pull latest SNPIT cpu image | |
| run: | | |
| docker pull rknop/roman-snpit-env:cpu | |
| - name: run test | |
| run: | | |
| docker compose run runtests |