Adding workflow for tests #2
Workflow file for this run
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: Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Test Image | |
| # Build the test image locally so all subsequent steps use the fresh code. | |
| run: make build-test-image SOURCE_BRANCH=${{ github.head_ref || github.ref_name }} | |
| - name: Run Unit and Integration Tests | |
| # Runs pytest on tests/unit and tests/integration inside the container | |
| run: make check-in-container SOURCE_BRANCH=${{ github.head_ref || github.ref_name }} | |
| - name: Run Database Tests | |
| # Spins up postgres/redis via docker-compose and runs tests_openshift/database | |
| run: make check-db SOURCE_BRANCH=${{ github.head_ref || github.ref_name }} |