-
Notifications
You must be signed in to change notification settings - Fork 67
110 lines (92 loc) · 2.75 KB
/
Copy pathci.yml
File metadata and controls
110 lines (92 loc) · 2.75 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install lint tools
run: pip install black==25.1.0 isort==5.13.2 "flake8==7.2.0"
- name: black
run: black --check .
- name: isort
run: isort --check .
- name: flake8
run: flake8 .
- name: snake_case
# check_snake_case.py owns the include/exclude rules; pass it everything
# under domino/ and it will skip paths that don't apply. Keeps CI in
# lockstep with the pre-commit hook (both invoke the same script).
run: find domino -name "*.py" | xargs python scripts/check_snake_case.py
typecheck:
name: Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install package and type stubs
run: |
pip install -e .
pip install "mypy==1.15.0" \
types-pyyaml \
types-requests \
types-retry \
types-pytz \
types-tabulate \
types-python-dateutil \
types-redis \
types-protobuf \
types-frozendict \
types-urllib3
- name: mypy
run: |
mypy domino/ \
--no-warn-no-return \
--namespace-packages \
--explicit-package-bases \
--ignore-missing-imports \
--follow-imports=silent \
--python-version=3.10
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -e .
pip install pytest pytest-cov requests-mock docker pytest-mock
- name: Run tests
run: |
pytest tests/ \
--ignore=tests/agents \
--ignore=tests/integration \
--ignore=tests/scripts \
--ignore=tests/test_operator.py \
--ignore=tests/test_spark_operator.py \
-v --tb=short \
--cov=domino \
--cov-report=xml \
--cov-report=term-missing
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
path: coverage.xml