Skip to content

Airflow

Airflow CI on GitHub Actions

DAG import checks reinstall the full Airflow dependency set each run.

5m → 20s
Setup

DAG import checks reinstall the full Airflow dependency set each run.

Why it happens

Airflow's constraint-pinned dependency tree is large and is installed from scratch every time.

What to change

  1. Cache the virtualenv keyed on the constraints file
  2. Run DAG validation without a scheduler using the standalone DagBag check
  3. Use a prebuilt Airflow image rather than pip installing in the job

Airflow on runnerhut

yaml
jobs:
validate:
runs-on: runnerhut-4vcpu-ubuntu-2404
container: apache/airflow:2.10.0
steps:
- uses: actions/checkout@v4
- run: python -c "from airflow.models import DagBag; assert not DagBag().import_errors"
A working starting point

The only runnerhut-specific line is `runs-on: runnerhut-4vcpu-ubuntu-2404`. Everything else is standard GitHub Actions — the same actions, the same secrets and the same permissions model you use today.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.