CI: Update GHA configuration to also run on the main branch (#158) #314
This file contains 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
--- | |
name: Main | |
on: | |
push: | |
branches: [ main ] | |
pull_request: ~ | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Run black/pylint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade -e ".[develop]" | |
python -m pip install --upgrade -r requirements.txt | |
- name: Run pylint | |
run: | | |
python -m pylint dags tests include | |
- name: Run black | |
uses: psf/black@stable | |
test: | |
name: Run pytest | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade -e ".[testing]" | |
python -m pip install --upgrade -r requirements.txt | |
- name: Run pytest | |
run: | | |
python -m pytest -vvv |