-
Notifications
You must be signed in to change notification settings - Fork 1.6k
109 lines (100 loc) · 2.77 KB
/
pull.yml
File metadata and controls
109 lines (100 loc) · 2.77 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
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
PYTHON_VERSION: "3.11"
RUST_TOOLCHAIN: "1.93.0"
jobs:
python-black:
name: 🐍 black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: python -m pip install --upgrade pip && pip install "black>=24,<25"
- run: black . --check
python-flake8:
name: 🐍 flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: python -m pip install --upgrade pip && pip install "flake8>=7,<8"
- run: flake8
python-mypy:
name: 🐍 mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install mypy
run: python -m pip install --upgrade "pip<25.0" && pip install "mypy>=1.10.0,<1.11.0"
- name: Sync dependencies
run: |
python ./.github/ci/get-dependencies.py
pip install -r requirements.txt
- name: Install type stubs
run: |
pip install \
types-pytz \
types-PyYAML \
types-requests \
types-simplejson \
types-protobuf \
types-python-dateutil \
pandas-stubs
- name: Run mypy
run: mypy .
python-isort:
name: 🐍 isort
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: python -m pip install --upgrade pip && pip install "isort>5,<6"
- run: isort --check .
cargo-fmt:
name: 🦀 cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
- run: rustup component add rustfmt
- run: cargo fmt -- --check
cargo-clippy:
name: 🦀 cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
- run: rustup component add clippy
- run: cargo clippy --locked --all-targets -- --deny warnings
cargo-test:
name: 🦀 cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
- run: cargo test --locked