👷(deps): Bump actions/checkout from 5 to 6 #72
Workflow file for this run
This file contains hidden or 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: CI | |
| on: [ push, pull_request ] | |
| jobs: | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| # Code based on https://docs.astral.sh/uv/guides/integration/github/ | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install System Dependencies | |
| # Retries installing files 3 times, as either the GitHub Actions runner or APT's API can be unreliable | |
| run: | | |
| sudo apt update | |
| sudo apt install python3-dev libldap2-dev libsasl2-dev libssl-dev -o Acquire::Retries=3 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Set `UV_PROJECT_ENVIRONMENT` envvar | |
| # Install packages into the system environment instead of a `.venv/`. | |
| # (`pythonLocation` is from `actions/setup-python` - see | |
| # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#environment-variables) | |
| run: echo "UV_PROJECT_ENVIRONMENT=$pythonLocation" >> $GITHUB_ENV | |
| - name: Install Python dependencies | |
| run: uv sync --locked --group ci | |
| - name: Create `.env` | |
| shell: bash | |
| run: cp .env.example .env | |
| - name: Run Django Tests | |
| run: | | |
| uv run manage.py collectstatic --no-input | |
| uv run coverage run manage.py test | |
| uv run coverage xml | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.xml |