-
Notifications
You must be signed in to change notification settings - Fork 17
74 lines (71 loc) · 2.21 KB
/
python-ci.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
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [main, prod]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: [main, prod]
jobs:
build:
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
strategy:
matrix:
include:
- package: "_delphi_utils_python"
dir: "delphi_utils"
- package: "changehc"
dir: "delphi_changehc"
- package: "claims_hosp"
dir: "delphi_claims_hosp"
- package: "doctor_visits"
dir: "delphi_doctor_visits"
- package: "google_symptoms"
dir: "delphi_google_symptoms"
- package: "hhs_hosp"
dir: "delphi_hhs"
- package: "nchs_mortality"
dir: "delphi_nchs_mortality"
- package: "nssp"
dir: "delphi_nssp"
- package: "nwss_wastewater"
dir: "delphi_nwss"
- package: "quidel_covidtest"
dir: "delphi_quidel_covidtest"
- package: "sir_complainsalot"
dir: "delphi_sir_complainsalot"
- package: "nhsn"
dir: "delphi_nhsn"
defaults:
run:
working-directory: ${{ matrix.package }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
pip install pylint pytest pydocstyle wheel
- name: Install
run: |
make install-ci
- name: Lint
run: |
make lint
- name: Test
run: |
make test
- uses: akaihola/[email protected]
with:
options: "--check --diff --isort --color"
src: "${{ matrix.package }}/${{ matrix.dir }}"
version: "~=2.1.1"