Skip to content

⬆️ Bump getsentry/action-release from 1.10.4 to 2.0.0 in the gha group #233

⬆️ Bump getsentry/action-release from 1.10.4 to 2.0.0 in the gha group

⬆️ Bump getsentry/action-release from 1.10.4 to 2.0.0 in the gha group #233

Workflow file for this run

name: Test
on:
pull_request:
workflow_dispatch:
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
env:
CI: true
FORCE_COLOR: 1
NODE_VERSION: "20"
PYTHON_VERSION: "3.12"
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
run: |
python -m pip install -U pip uv
- name: Get cache dir
id: uv-cache
run: |
echo "dir=$(uv cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: cache-uv
with:
path: ${{ steps.uv-cache.outputs.dir }}
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-uv-
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v4
id: cache-npm
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: |
python -m uv pip install --system --constraint requirements.txt --requirement pyproject.toml --extra dev
npm install
- name: Install system packages
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
build-essential
playwright install --with-deps
- name: Run migrations
run: |
python -m manage migrate --skip-checks
- name: Build staticfiles
run: |
python -m manage tailwind --skip-checks build
python -m manage collectstatic --no-input --skip-checks --no-default-ignore
# https://hynek.me/articles/ditch-codecov-python/
- name: Run tests
run: |
time python -m pytest --durations 10 -n auto --dist loadfile --cov --cov-report= --cov-config=pyproject.toml
python -m coverage html --skip-covered --skip-empty
python -m coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY
# python -m coverage report --fail-under=100
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage-report-${{ github.run_id }}
path: htmlcov
types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
run: |
python -m pip install -U pip uv
- name: Get cache dir
id: uv-cache
run: |
echo "dir=$(uv cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: cache-uv
with:
path: ${{ steps.uv-cache.outputs.dir }}
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Install dependencies
run: |
python -m uv pip install --system --constraint requirements.txt --requirement pyproject.toml --extra dev
- name: Install system packages
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
build-essential
- name: Run mypy
env:
DATABASE_URL: sqlite:///db.sqlite3
run: |
python -m mypy
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
run: |
python -m pip install -U pip uv
- name: Get cache dir
id: uv-cache
run: |
echo "dir=$(uv cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: cache-uv
with:
path: ${{ steps.uv-cache.outputs.dir }}
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Install dependencies
run: |
python -m uv pip install --system --constraint requirements.txt --requirement pyproject.toml --extra dev
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
build-essential
- name: Run deployment checks
env:
DEBUG: False
DATABASE_URL: sqlite:///db.sqlite3
run: |
python -m manage check --deploy