experiment with splitting out tasks into callable workflows #1
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: test | ||
on: workflow_call | ||
jobs: | ||
python-tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
DJANGO_SETTINGS_MODULE: rca.settings.test | ||
SECRET_KEY: testingsecretkey | ||
SECURE_SSL_REDIRECT: false | ||
ALLOWED_HOSTS: localhost | ||
DATABASE_URL: postgres://postgres:postgres@localhost/postgres | ||
BIRDBATH_REQUIRED: false | ||
services: | ||
postgres: | ||
image: postgres:12.3 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- uses: Gr1N/setup-poetry@v8 | ||
with: | ||
poetry-version: 1.5.0 | ||
- name: Install Poetry | ||
run: | | ||
poetry config virtualenvs.create false && | ||
poetry install | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install npm dependencies | ||
run: npm install | ||
- name: Compile static files | ||
run: npm run build:prod | ||
- name: collectstatic | ||
run: python manage.py collectstatic --verbosity 0 --noinput --clear | ||
- name: System checks | ||
run: python manage.py check | ||
- name: Missing migrations | ||
run: python manage.py makemigrations --check --noinput | ||
- name: Test | ||
run: python manage.py test --settings=rca.settings.test |