Skip to content

ci: lint all the things #3112

ci: lint all the things

ci: lint all the things #3112

name: API Pull Request
on:
pull_request:
paths:
- api/**
- .github/**
types: [opened, synchronize, reopened, ready_for_review]
defaults:
run:
working-directory: api
jobs:
test:
runs-on: ubuntu-latest
name: API Unit Tests
services:
postgres:
image: postgres:11.12-alpine
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
strategy:
max-parallel: 4
matrix:
python-version: ['3.10', '3.11']
steps:
- name: Cloning repo
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install Dependencies
run: make install
- name: Create analytics database
env:
PGPASSWORD: postgres
run: createdb -h localhost -U postgres -p 5432 analytics
- name: Check for missing migrations
env:
DOTENV_OVERRIDE_FILE: .env-ci
opts: --no-input --dry-run --check
run: make django-make-migrations
- name: Run Tests
env:
DOTENV_OVERRIDE_FILE: .env-ci
run: make test