toplev: linter fix #423
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python linting and testing | |
on: | |
push: | |
branches: [ master, test* ] | |
pull_request: | |
branches: [ master, test* ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9, 3.10.8, 3.11] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
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 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
flake8 --exclude '*_uc.py,*_ratios.py' --ignore=E302,E128,E741,E251,E305,E221,E127,E126,E501,E401,E231,E201,E261,E731,E122,E131,E226,W504,E402,E301,W503,E265,E306,E227,E306,W391,E202,E241 | |
- name: Run toplev tests | |
run: | | |
WRAP=python PERF=./fake-perf.py NORES=1 ./tl-tester | |
- name: Run ocperf tests | |
run: | | |
python ./event_download.py -a | |
WRAP=python PERF=./fake-perf.py NORES=1 ./tester | |
- name: Run other tests | |
run: | | |
pip install matplotlib | |
WRAP=python PERF=./fake-perf.py NORES=1 ./other-tester | |
- name: Run ucevent tests | |
run: | | |
set -e | |
cd ucevent | |
for i in jkt ivt hsx bdxde bdx skx ; do FORCECPU=$i WRAP=python MOCK=1 NORES=1 ./uctester ; done | |
# XXX WRAP=python MOCK=1 NORES=1 ./RUN-ALL # need to avoid GNU parallel | |
# | |
- name: Run parser tests | |
run: | | |
cd parser | |
./tester | |