Skip to content

CI

CI #9

Workflow file for this run

# 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