dag api di runs everyday #1694
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 | |
VIRTUAL_ENV: .venv | |
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@v4.1.6 | |
- name: 🐍 Install Python | |
uses: actions/setup-python@v5.1.0 | |
with: | |
python-version: "3.10" | |
cache: pip | |
cache-dependency-path: requirements/dev.txt | |
- name: 📥 Install Python dependencies | |
run: | | |
make venv | |
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH | |
- name: ⚙ Setup airflow database | |
run: | | |
airflow db reset --yes | |
airflow db migrate | |
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: ✨ Verify quality 👌 | |
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 |