Skip to content

Update coverage-workflow.yml #43

Update coverage-workflow.yml

Update coverage-workflow.yml #43

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 Dockerfile.test -t test-image .
working-directory: backend/tests # Set the working directory to backend/tests
- name: Run tests with coverage
run: docker run --rm test-image # Run the Docker container to execute the tests with coverage
working-directory: backend/tests # Set the working directory to backend/tests
- name: Upload coverage report
uses: codecov/codecov-action@v3 # Upload coverage report to Codecov
with:
file: coverage.xml # Specify the coverage file path
working-directory: backend/tests # Set the working directory to backend/tests

Check failure on line 34 in .github/workflows/coverage-workflow.yml

View workflow run for this annotation

GitHub Actions / Run Tests with Coverage

Invalid workflow file

The workflow is not valid. .github/workflows/coverage-workflow.yml (Line: 34, Col: 9): Unexpected value 'working-directory'