Update coverage-workflow.yml #18
This file contains 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: Test Coverage | |
| on: | |
| push: | |
| branches: | |
| - gargi-production | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.9 | |
| - name: Build Docker image for tests | |
| working-directory: backend | |
| run: | | |
| docker build -t coverage-test -f tests/Dockerfile.test . | |
| - name: Run tests in Docker container | |
| run: | | |
| docker run coverage-test | |
| - name: Upload coverage results | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: coverage-results | |
| path: backend/tests/coverage.xml |