forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (45 loc) · 1.28 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
49
50
51
52
53
54
name: Lint
on:
push:
branches:
- maintenance/**
pull_request:
branches:
- main
- maintenance/**
permissions:
contents: read # to fetch code (actions/checkout)
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test_lint:
name: Lint
# If using act to run CI locally the github object does not exist and the usual skipping should not be enforced
if: "github.repository == 'scipy/scipy' || github.repository == ''"
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
run: |
python -m pip install ruff cython-lint packaging
- name: Lint
run: |
set -euo pipefail
python tools/lint.py --diff-against origin/$GITHUB_BASE_REF
python tools/unicode-check.py
python tools/check_test_name.py
- name: Check that Python.h is first in any file including it.
shell: bash
run: |
python tools/check_python_h_first.py