Skip to content
54 changes: 54 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
version: 2.1

jobs:
clone-stack:
docker:
- image: cimg/python:3.12
steps:
- checkout
- run:
name: Clone stack
command: git clone https://github.com/datagouv/data-engineering-stack.git
- persist_to_workspace:
root: .
paths:
- .
check-dags:
docker:
- image: registry.gitlab.com/etalab/data.gouv.fr/infra/airflow-extended:airflow2.10.5-python3.12-0.2.11
auth:
username: $GITLAB_USERNAME
password: $GITLAB_ACCESS_TOKEN
steps:
- checkout
- attach_workspace:
at: .
- restore_cache:
keys:
- py-cache-v1-{{ arch }}-{{ checksum "requirements.txt" }}
- run:
name: Install dependencies
command: |
virtualenv venv
source venv/bin/activate
pip install -r data-engineering-stack/requirements.txt
- save_cache:
key: py-cache-v1-{{ arch }}-{{ checksum "requirements.txt" }}
paths:
- venv
- run:
name: Check DAGs
command: |
source venv/bin/activate
airflow db init
airflow dags list-import-errors --output=json | jq -e 'select(type=="array" and length == 0)'

workflows:
version: 2
build:
jobs:
- clone-stack
- check-dags:
requires:
- clone-stack