[ci] Move 'lint' to 3.12 (#4053)

- Add to run on MacOS + Windows too
- Do not install [d] dependecies as blackd is not actually run / checked
- Move to default GitHub action version - which is 3.12 today
This commit is contained in:
Cooper Lees 2023-11-18 18:11:50 -08:00 committed by GitHub
parent 96faa3b469
commit f23b845a29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,4 @@
name: Lint name: Lint + format ourselves
on: [push, pull_request] on: [push, pull_request]
@ -11,7 +11,11 @@ jobs:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository github.repository
runs-on: ubuntu-latest runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -26,12 +30,12 @@ jobs:
- name: Set up latest Python - name: Set up latest Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: "3.11" python-version: "*"
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
python -m pip install -e '.[d]' python -m pip install -e '.'
python -m pip install tox python -m pip install tox
- name: Run pre-commit hooks - name: Run pre-commit hooks

View File

@ -94,5 +94,5 @@ commands =
setenv = PYTHONPATH = {toxinidir}/src setenv = PYTHONPATH = {toxinidir}/src
skip_install = True skip_install = True
commands = commands =
pip install -e .[d] pip install -e .
black --check {toxinidir}/src {toxinidir}/tests black --check {toxinidir}/src {toxinidir}/tests