Fixed export command format (#363) #1719
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 | |
env: | |
POETRY_NO_INTERACTION: 1 | |
on: | |
push: | |
branches: [ 'main' ] | |
pull_request: | |
branches: [ 'main' ] | |
merge_group: | |
branches: [ 'main' ] | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'poetry' | |
- name: Install dependencies | |
run: poetry install --no-root --only=lint | |
- name: Lint with black | |
run: poetry run black --check -- . | |
- name: Lint with isort | |
run: poetry run isort --check -- . | |
- name: Lint with ruff | |
run: poetry run ruff --show-source -- . | |
- name: Lint with flake8 | |
run: poetry run flake8 . --count --show-source --statistics | |
test: | |
runs-on: ubuntu-latest | |
env: | |
EDA_SECRET_KEY: 'test' | |
EDA_DB_PASSWORD: 'secret' | |
services: | |
postgres: | |
image: 'postgres:13' | |
env: | |
POSTGRES_DB: 'eda' | |
POSTGRES_PASSWORD: 'secret' | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- '5432:5432' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'poetry' | |
- name: Install package | |
run: poetry install -E all --only main,test | |
- name: Check migrations are up to date | |
run: poetry run /usr/bin/env aap-eda-manage makemigrations --dry-run --check | |
- name: Run tests | |
run: poetry run python -m pytest |