mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Add ruff lint check in CI
This commit is contained in:
parent
3f53886574
commit
a07e82806d
36
.github/workflows/lint.yml
vendored
Normal file
36
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '**/*.py'
|
||||||
|
- 'bin/*'
|
||||||
|
- 'sim/vcs/run_vcs'
|
||||||
|
- '.ruff.toml'
|
||||||
|
- '!addins/*'
|
||||||
|
- '!tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/Q/*'
|
||||||
|
- '!tests/fp/quad/fpdatasetgen.py'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**/*.py'
|
||||||
|
- 'bin/*'
|
||||||
|
- 'sim/vcs/run_vcs'
|
||||||
|
- '.ruff.toml'
|
||||||
|
- '!addins/*'
|
||||||
|
- '!tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/Q/*'
|
||||||
|
- '!tests/fp/quad/fpdatasetgen.py'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Python ${{matrix.version}} lint
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
version: [39, 312] # Test on oldest and newest verions used in wally-package-install.sh
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set Python version
|
||||||
|
run: sed -i '/^target-version/c\target-version = "py${{matrix.version}}"' .ruff.toml
|
||||||
|
- name: Run ruff
|
||||||
|
uses: astral-sh/ruff-action@v3
|
Loading…
Reference in New Issue
Block a user