Skip to content

Compile messages by changing dir to apps (#266) #265

Compile messages by changing dir to apps (#266)

Compile messages by changing dir to apps (#266) #265

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
test:
name: 📋 Test
runs-on: ubuntu-latest
env:
DJANGO_SETTINGS_MODULE: apps.guide.settings.test
DATABASE_URL: postgres://postgres:postgres@localhost/postgres # pragma: allowlist secret
SECRET_KEY: iamnotsosecret
ALLOWED_HOSTS: localhost
services:
postgres:
image: postgres:14
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@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.2.2 python -
- name: Install Python dependencies
run: poetry install
- name: System checks
run: poetry run python manage.py check
- name: Collect static
run: poetry run python manage.py collectstatic --noinput --clear
- name: Create cache table
run: poetry run python manage.py createcachetable
- name: Missing migrations
run: poetry run python manage.py makemigrations --check
- name: Mock static
run: mkdir ./apps/frontend/static && echo "{}" > ./apps/frontend/static/manifest.json
- name: Test
run: make test-coverage
check_python:
name: 🐍 Check Python (backend)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.2.2 python -
- name: Install Python dependencies
run: poetry install
- name: Lint
run: make lint-backend
check_node:
name: 👩‍🚀 Check Node (frontend)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install npm dependencies
run: npm ci
- name: Lint
run: npm run lint