Repository navigation
Merge pull request #36 from teavay2188/main #81
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: All tests | |
| on: | |
| push: | |
| workflow_call: | |
| jobs: | |
| test-setup: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo ${{ github.sha }} > cachefile | |
| - uses: actions/cache@v3 | |
| id: cache | |
| with: | |
| key: ${{ github.sha }} | |
| path: cachefile | |
| outputs: | |
| tests_already_run: ${{ steps.cache.outputs.cache-hit == true }} | |
| test: | |
| needs: test-setup | |
| if: needs.test-setup.outputs.test_already_run != true | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.x" | |
| - run: pip install pytest . | |
| - run: python3 -m pytest tests/ |