Skip to content

Update coverage-workflow.yml #42

Update coverage-workflow.yml

Update coverage-workflow.yml #42

name: Run Tests with Coverage
on:
push:
branches:
- gargi-production # Trigger only for the gargi-production branch
pull_request:
branches:
- gargi-production # Trigger for PRs targeting gargi-production branch
jobs:
test:
runs-on: self-hosted # Use self-hosted runner
steps:
- name: Checkout repository
uses: actions/checkout@v3 # Checkout the code from the repository
- name: Set up Docker
uses: docker/setup-buildx-action@v2 # Set up Docker buildx to build Docker images
- name: Build Docker image for tests
run: docker build -f backend/tests/Dockerfile.test -t test-image .
- name: Run tests with coverage
run: docker run --rm test-image # Run the Docker container to execute the tests with coverage
- name: Upload coverage report
uses: codecov/codecov-action@v3 # Upload coverage report to Codecov
with:
file: coverage.xml # Specify the coverage file path