forked from BasPH/data-pipelines-with-apache-airflow
-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (37 loc) · 1.46 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# https://help.github.com/en/github/automating-your-workflow-with-github-actions
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
name: CI
on: [workflow_dispatch]
# push:
# paths:
# - "*.py"
jobs:
precommit:
name: Python static checks and tests
runs-on: ubuntu-22.04 # https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- uses: actions/checkout@v4 # https://help.github.com/en/github/automating-your-workflow-with-github-actions/configuring-a-workflow#using-the-checkout-action
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.12.4
- name: Install Flake8
run: pip install flake8
- name: Run Flake8
run: flake8
working-directory: chapter09/dags
- name: Install Pylint
run: pip install pylint
- name: Run Pylint
run: find . -name "*.py" | xargs pylint --output-format=colorized
working-directory: chapter09/dags
- name: Install Black
run: pip install black
- name: Run Black
run: find . -name "*.py" | xargs black --check
working-directory: chapter09/dags
- name: Install dependencies
run: pip install apache-airflow pytest
- name: Test DAG integrity
run: pytest tests/
working-directory: chapter09/dags