Skip to content

Merge pull request #164 from SmoFlaDru/pre-commit-ci-update-config #415

Merge pull request #164 from SmoFlaDru/pre-commit-ci-update-config

Merge pull request #164 from SmoFlaDru/pre-commit-ci-update-config #415

Workflow file for this run

name: 'Django CI'
on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]
workflow_dispatch:
jobs:
build:
name: Build & test
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.11]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Code style check
uses: astral-sh/ruff-action@v3
with:
version: "0.9.7"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install uv
uv sync --dev
- name: 'Create env file'
run: |
mv .env.test .env
- name: Run Tests
run: |
uv run coverage run manage.py test && uv run coverage xml
- name: Report test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results
path: tests_result.xml
- name: Post coverage result
uses: orgoro/[email protected]
env:
gh_secret: ${{ secrets.GH_PR_WRITE_TOKEN }}
if: ${{ env.gh_secret != '' }}
with:
coverageFile: coverage.xml
token: ${{ secrets.GH_PR_WRITE_TOKEN }}
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: event-file
path: ${{ github.event_path }}