d4a51e4102
* Adding att v3 support * misc fix * bug fix * Python linting workflow and rules * fix regex * Adding temporary args * fix temporary args * fix format * remove att_perfcounters from test input * Review comments (#163) Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com> * Revert "Review comments (#163)" This reverts commit 9ef0f8e5a4489d5581255e1b70ced2aef5c1c1d0. * Address review comments 2 * review changes * review comments * review * cmake alias * review * review * review * review * Enabling percounter in v3 script * review * formatting * formatting --------- Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com> Co-authored-by: Baraldi, Giovanni <Giovanni.Baraldi@amd.com> Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
name: Python Linting
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ amd-staging, amd-mainline ]
|
|
paths:
|
|
- '**.py'
|
|
pull_request:
|
|
paths:
|
|
- '**.py'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
linting:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.8', '3.10', '3.12']
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
- name: Lint with flake8
|
|
run: |
|
|
# stop the build if there are Python syntax errors or undefined names
|
|
flake8 source --count --show-source --statistics --select=E9,F63,F7,F82
|
|
# flake8 options are defined in .flake8
|
|
flake8 source --count --show-source --statistics
|