Skip to content

Commit

Permalink
Update coverage-workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Garima Ketan Chauhan authored and GitHub Enterprise committed Apr 2, 2025
1 parent 6899bbc commit c1e899a
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/coverage-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,32 @@ on:

jobs:
test:
runs-on: self-hosted # Runs on your self-hosted runner
runs-on: self-hosted # Use self-hosted runner if needed

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Debug List directory contents
run: |
echo "Listing contents of backend/tests/"
ls -la backend/tests/
- name: Build test container
run: docker build -t secfit-backend-test -f backend/tests/Dockerfile.test .

run: |
docker build -t secfit-backend-test -f backend/tests/dockerfile.test backend/tests
# The build context is set to the backend/tests folder

- name: Run tests and generate coverage report
run: docker run --rm --name secfit-backend-test secfit-backend-test

run: |
docker run --rm --name secfit-backend-test secfit-backend-test
- name: Copy coverage report from container
run: |
docker create --name temp_container secfit-backend-test
docker cp temp_container:/app/htmlcov . || echo "No coverage report found"
docker rm temp_container
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit c1e899a

Please sign in to comment.