Skip to content

Macos12

Macos12 #304

Workflow file for this run

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/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0 # previous commits used in tools/lint.py
submodules: recursive
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
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