36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
name: CI
|
|
on: [push]
|
|
|
|
jobs:
|
|
ci:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.13"]
|
|
os: [ubuntu-24.04]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Setup dependencies
|
|
run: pip install uv
|
|
- name: Lint
|
|
run: uv venv && uv run ruff check .
|
|
- name: Run tests
|
|
env:
|
|
DJANGO_SETTINGS_MODULE: config.settings
|
|
DEBUG: True
|
|
run: uv run manage.py collectstatic && uv run pytest --cov --junitxml=junit.xml -o junit_family=legacy && uv run coverage xml
|
|
- name: Upload coverage reports to Codecov
|
|
uses: codecov/codecov-action@v4.0.1
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
slug: pablo-moreno/shoppy
|
|
- name: Upload test results to Codecov
|
|
if: ${{ !cancelled() }}
|
|
uses: codecov/test-results-action@v1
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|