Apply latest wagtail patch release (bump 6.2.2 -> 6.2.3) #1622
Workflow file for this run
This file contains 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: | |
paths-ignore: ['docs/**'] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- id: node-cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/.nvmrc') }}-${{ hashFiles('**/package-lock.json') }} | |
- if: steps.node-cache.outputs.cache-hit != 'true' | |
run: npm ci --no-audit | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ env.HOME }}/.cache/pre-commit | |
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
- uses: pre-commit/[email protected] | |
test_js: | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- id: node-cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/.nvmrc') }}-${{ hashFiles('**/package-lock.json') }} | |
- if: steps.node-cache.outputs.cache-hit != 'true' | |
run: npm ci --no-audit | |
- run: npm run test | |
compile_static: | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- id: node-cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/.nvmrc') }}-${{ hashFiles('**/package-lock.json') }} | |
- if: steps.node-cache.outputs.cache-hit != 'true' | |
run: npm ci --no-audit | |
- run: npm run build:prod | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: static | |
path: tbx/static_compiled/ | |
test_python: | |
needs: lint | |
runs-on: ubuntu-latest | |
env: | |
DJANGO_SETTINGS_MODULE: tbx.settings.test | |
DATABASE_URL: postgres://postgres:postgres@localhost/postgres # pragma: allowlist secret | |
CFG_SECRET_KEY: iamnotsosecret # pragma: allowlist secret | |
CFG_ALLOWED_HOSTS: localhost | |
services: | |
postgres: | |
image: postgres:15.5 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres # pragma: allowlist secret | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: pipx install poetry==1.8.3 # Make sure this matches POETRY_VERSION in the Dockerfile | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
cache: 'poetry' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: static | |
path: tbx/static_compiled/ | |
- name: Install Python dependencies | |
run: poetry install | |
- name: collectstatic | |
run: poetry run ./manage.py collectstatic --verbosity 0 --noinput --clear | |
- name: System checks | |
run: poetry run ./manage.py check | |
- name: Check for missing migrations | |
run: poetry run ./manage.py makemigrations --check --noinput | |
- name: Create cache table | |
run: poetry run ./manage.py createcachetable | |
- name: Test | |
run: poetry run ./manage.py test |