-
Notifications
You must be signed in to change notification settings - Fork 6
executable file
·46 lines (46 loc) · 1.29 KB
/
linting.yml
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
45
46
---
name: Lint Code Base
on: [push, pull_request]
jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.11.2"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade ruff
python -m pip install --upgrade black
# Include `--format=github` to enable automatic inline annotations.
- name: Run Ruff
run: ruff check --diff -- --format=github .
- name: Run Black
uses: psf/black@stable
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
needs: [build]
strategy:
fail-fast: true
matrix:
python-version: [3.10.8]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pytest
python -m pip install --upgrade apache-airflow
- name: unit tests
run: |
pytest tests/unit_tests -v