Skip to content

Commit a327a08

Browse files
authored
add deploy-coverage stage to ci.yml (#11)
* add deploy-coverage stage to ci.yml * fix ci.yml * Fix readme
1 parent 033b466 commit a327a08

2 files changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,38 @@ jobs:
6161
source venv/bin/activate
6262
python manage.py migrate
6363
64-
- name: Run tests
64+
- name: Run tests with coverage
6565
run: |
6666
source venv/bin/activate
67-
pytest --disable-warnings
67+
pytest --cov=. --cov-report=html
6868
6969
- name: Run Ruff Linter
7070
run: |
7171
source venv/bin/activate
7272
ruff check .
73+
74+
- name: Upload coverage report
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: htmlcov
78+
path: htmlcov/
79+
80+
deploy-coverage:
81+
needs: build-test-lint
82+
runs-on: ubuntu-latest
83+
84+
steps:
85+
- uses: actions/checkout@v4
86+
87+
- name: Download coverage artifact
88+
uses: actions/download-artifact@v4
89+
with:
90+
name: htmlcov
91+
path: htmlcov
92+
93+
- name: Deploy to GitHub Pages
94+
uses: peaceiris/actions-gh-pages@v4
95+
with:
96+
github_token: ${{ secrets.GITHUB_TOKEN }}
97+
publish_dir: ./htmlcov
98+
publish_branch: gh-pages

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# 🧩 TaskFlow API
22

3+
![Coverage Report](https://omidcodes.github.io/taskflow-api/index.html)
4+
35
A Django RESTful API for managing personal or team tasks — featuring PostgreSQL, RabbitMQ, Celery, and Nginx in a Dockerized production setup.
46

57
---

0 commit comments

Comments
 (0)