generated from tweag/project
-
Notifications
You must be signed in to change notification settings - Fork 14
32 lines (29 loc) · 1023 Bytes
/
lint.yaml
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
name: lint
on: [workflow_call]
jobs:
lint:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.5.1" # support for Python 3.7 was dropped in 1.6.0
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-lint-${{ hashFiles('poetry.lock') }}
- name: Install project
run: poetry install --no-interaction --sync --with=nox,lint
- name: Run linters on Python ${{ matrix.python-version }}
run: poetry run nox --no-venv --no-install --non-interactive -s lint