mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-20 03:47:20 -04:00
Add ruff lint check in CI
This commit is contained in:
parent
3f53886574
commit
a07e82806d
1 changed files with 36 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue