-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1.17 KB
/
lint.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
name: lint
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
# make workflow "callable" by others
workflow_call:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3'
- '3.8' # used by some NVBW infrastructure
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Python v${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: pip install
run: pip install -r requirements.txt -r requirements-dev.txt
- name: lint using ruff
# We could also use the official GitHub Actions integration.
# https://beta.ruff.rs/docs/usage/#github-action
# uses: chartboost/ruff-action@v1
run: ruff check --format=github .
- name: format using black
# We could also use the official GitHub Actions integration.
# https://black.readthedocs.io/en/stable/integrations/github_actions.html
# uses: uses: psf/black@stable
run: |
black -S --check --diff .
- name: type-check using mypy
run: |
mypy .