Skip to content

Update CI configuration for Rust workflow #745

Update CI configuration for Rust workflow

Update CI configuration for Rust workflow #745

Workflow file for this run

name: CI / Linton:push:paths:- '.py'

Check failure on line 1 in .github/workflows/ci-lint.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci-lint.yml

Invalid workflow file

You have an error in your yaml syntax on line 1
- '.github/workflows/lint.yml'
pull_request:
paths:
- '.py'- '.github/workflows/lint.yml'Added workflow_dispatch for manual triggeringworkflow_dispatch:jobs:lint:# Upgraded to ubuntu-latest which tracks the newest stable Ubuntu runnerruns-on: ubuntu-latest# Use a matrix to test across multiple Python versions
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout code
# Upgraded checkout action to v4
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
# Upgraded setup-python action to v5
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Enable caching for pip to speed up workflow runs
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Added black for formatting checks alongside flake8
pip install flake8 black
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Check formatting with black
run: |
# Check if the code is formatted with black.
# Fails the build if it's not formatted correctly.
black --check .