diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 096a39f..63ee36b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,12 +61,38 @@ jobs: source venv/bin/activate python manage.py migrate - - name: Run tests + - name: Run tests with coverage run: | source venv/bin/activate - pytest --disable-warnings + pytest --cov=. --cov-report=html - name: Run Ruff Linter run: | source venv/bin/activate ruff check . + + - name: Upload coverage report + uses: actions/upload-artifact@v4 + with: + name: htmlcov + path: htmlcov/ + + deploy-coverage: + needs: build-test-lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Download coverage artifact + uses: actions/download-artifact@v4 + with: + name: htmlcov + path: htmlcov + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./htmlcov + publish_branch: gh-pages diff --git a/README.md b/README.md index 9cb236e..157b2fe 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # 🧩 TaskFlow API +![Coverage Report](https://omidcodes.github.io/taskflow-api/index.html) + A Django RESTful API for managing personal or team tasks — featuring PostgreSQL, RabbitMQ, Celery, and Nginx in a Dockerized production setup. ---