improvement of the hiring delay in order to consider siaes #755
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 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
CI: 1 | |
PYTHONPATH: . | |
PGPASSWORD: password | |
PGHOST: localhost | |
PGUSER: postgres | |
PGPORT: 5432 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
services: | |
postgres: | |
image: postgis/postgis:14-master | |
env: | |
POSTGRES_PASSWORD: password | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: 🐘 Non-durable PostgreSQL | |
run: | | |
psql <<SQL | |
ALTER SYSTEM SET fsync=off; | |
ALTER SYSTEM SET synchronous_commit=off; | |
ALTER SYSTEM SET full_page_writes=off; | |
CREATE DATABASE pilotage; | |
CREATE DATABASE airflow; | |
SQL | |
docker kill --signal=SIGHUP ${{ job.services.postgres.id }} | |
- uses: actions/checkout@v3.5.0 | |
- name: 🐍 Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: pip | |
cache-dependency-path: requirements-ci.txt | |
- name: 📥 Install Python dependencies | |
run: | | |
make venv_ci | |
make update | |
echo ".venv/bin" >> $GITHUB_PATH | |
- name: ⚙ Setup airflow database | |
run: make airflow_initdb | |
env: | |
AIRFLOW__CORE__FERNET_KEY: U7sOUkZeQ6JGmwQoG6anMTdnl_nzy4f74IFkNmMeW50= | |
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://postgres:password@localhost:5432/airflow | |
- name: Install dbt packages | |
run: dbt deps | |
- name: ✨ Lint with black, isort, flake8 & sqlfluff 👌 | |
run: make quality | |
env: | |
PGDATABASE: pilotage | |
- name: 🧪 Run airflow tests | |
run: make test | |
env: | |
PGDATABASE: pilotage | |
AIRFLOW__CORE__FERNET_KEY: U7sOUkZeQ6JGmwQoG6anMTdnl_nzy4f74IFkNmMeW50= | |
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://postgres:password@localhost:5432/airflow | |
- name: 📓 Generate dbt documentation | |
run: dbt docs generate | |
env: | |
PGDATABASE: pilotage |