chore(deps):update #170
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Django CI | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
inputs: | |
tags: | |
description: 'Test scenario tags' | |
required: false | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# docs: | |
# name: Deploy docs | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout main | |
# uses: actions/checkout@v4 | |
# | |
# - name: Deploy docs | |
# uses: mhausenblas/mkdocs-deploy-gh-pages@master | |
# # Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# CONFIG_FILE: ./mkdocs.yml | |
# REQUIREMENTS: ./docs/requirements.txt | |
build: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [ '3.11' ] | |
poetry-version: [ '1.6.1' ] | |
name: Build and test ${{ matrix.python-version }} | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Setup Python, Poetry and Dependencies" | |
uses: packetcoders/action-setup-cache-python-poetry@main | |
with: | |
python-version: ${{ matrix.python-version }} | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Run Tests | |
run: | | |
cd forum | |
poetry run coverage run manage.py test --no-logs | |
- name: Coverage report | |
id: coverage_report | |
shell: bash | |
run: | | |
mv forum/.coverage . | |
cp forum/.coveragerc . | |
echo 'REPORT<<EOF' >> $GITHUB_ENV | |
poetry run coverage report >> $GITHUB_ENV | |
echo 'EOF' >> $GITHUB_ENV | |
- uses: mshick/add-pr-comment@v2 | |
with: | |
message: | | |
Coverage report: | |
``` | |
${{ env.REPORT }} | |
``` | |
message-id: 'coverage' | |
allow-repeats: false | |
- name: json report | |
run: | | |
poetry run coverage json | |
echo "COVERAGE=$(jq '.totals.percent_covered_display|tonumber' coverage.json)" >> $GITHUB_ENV | |
- name: Create Awesome Badge | |
uses: schneegans/[email protected] | |
with: | |
auth: ${{ secrets.GIST_SECRET }} | |
gistID: ${{ secrets.COVERAGE_GIST_ID }} | |
filename: wiwik.json | |
label: Coverage | |
message: ${{ env.COVERAGE }}% | |
color: green |