Skip to content

Bump the patch-updates group across 1 directory with 6 updates #9745

Bump the patch-updates group across 1 directory with 6 updates

Bump the patch-updates group across 1 directory with 6 updates #9745

Workflow file for this run

---
name: Linting and Testing
on:
push:
branches:
- master
pull_request:
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup Poetry
uses: snok/install-poetry@v1
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore any cached Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install any new dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Run isort
run: make isortcheck
- name: Run black
run: make blackcheck
- name: Run Ruff
run: make ruff
tests:
name: Django Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: thalia
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
env:
DJANGO_ENV: testing
steps:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup Poetry
uses: snok/install-poetry@v1
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore any cached Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install any new dependencies
run: poetry install --with postgres
if: steps.cache.outputs.cache-hit != 'true'
- name: Run tests
run: make test
- name: Report coverage
run: make coverage
- name: Create coverage report
run: make covhtml
- name: Save coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: covhtml
run-fixtures:
name: Run fixtures
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: thalia
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
env:
DJANGO_ENV: testing
steps:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup Poetry
uses: snok/install-poetry@v1
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore any cached Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install any new dependencies
run: poetry install --with postgres
if: steps.cache.outputs.cache-hit != 'true'
- name: Run create fixtures
run: make fixtures
documentation-tests:
name: Documentation Tests
runs-on: ubuntu-latest
steps:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup Poetry
uses: snok/install-poetry@v1
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore any cached Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install any new dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
upload-coverage:
name: Deploy Coverage Report
runs-on: ubuntu-latest
needs: [tests]
steps:
- uses: actions/download-artifact@v4
with:
name: coverage-html
path: html
- name: Create URL safe version of GITHUB_REF
run: echo "GITHUB_REF_SLUG=$(echo \"${GITHUB_REF#refs/heads/}\"| iconv -t ascii//TRANSLIT | sed -E 's/[^a-zA-Z0-9]+/-/g' | sed -E 's/^-+|-+$//g' | tr A-Z a-z)" >> "${GITHUB_ENV}"
- name: Sync files to S3
run: aws s3 sync html "s3://thalia-coverage/${GITHUB_REF_SLUG}/"
env:
AWS_DEFAULT_REGION: eu-west-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}