-
Notifications
You must be signed in to change notification settings - Fork 3
Add DAGs check workflow #473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Pierlou
wants to merge
14
commits into
main
Choose a base branch
from
feat/add-dag-check
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
960e0d3
feat: add dags check workflow
Pierlou 302120d
fix: fix config file
Pierlou 3a0e2e2
fix: fix config file
Pierlou afdb1e5
fix: fix config file
Pierlou 6baa608
fix: fix config file
Pierlou a27f053
fix: fix config file
Pierlou ba52687
fix: make stack persistent
Pierlou fcd190d
fix: use the right command
Pierlou 1a45ce9
fix: install jq upstream
Pierlou 7f14d8e
fix: use sudo
Pierlou 1bb6f46
fix: use an image that has jq
Pierlou 1105a46
fix: apt-get as sudo
Pierlou 737dd56
fix: use custom airflow image
Pierlou 4ff6cec
fix: add cache and required command
Pierlou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| 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 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.