[.flake8] ignore B038 for now, revisit later #1757
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
name: AFDKO Test Suite | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
pull_request: | |
branches: [develop] | |
types: [opened] | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
schedule: | |
- cron: '0 11 1 * *' | |
workflow_dispatch: | |
inputs: | |
reason: | |
description: 'Reason for running workflow' | |
required: true | |
jobs: | |
run_tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
exclude: | |
- os: macos-latest | |
python-version: "3.8" | |
- os: macos-latest | |
python-version: "3.9" | |
- os: macos-latest | |
python-version: "3.10" | |
- os: windows-latest | |
python-version: "3.8" | |
- os: windows-latest | |
python-version: "3.9" | |
- os: windows-latest | |
python-version: "3.10" | |
steps: | |
- name: Log reason (manual run only) | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
echo "Reason for triggering: ${{ github.event.inputs.reason }}" | |
- name: Check out | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
with: | |
fetch-depth: 0 # unshallow fetch for setuptools-scm | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Use MSBuild (Windows) | |
if: matrix.os == 'windows-latest' | |
uses: microsoft/setup-msbuild@v1.3 | |
with: | |
vs-version: '[17.0,]' | |
msbuild-architecture: x64 | |
- name: Set Windows generator to Visual Studio | |
if: matrix.os == 'windows-latest' | |
run: | | |
echo "CMAKE_GENERATOR=Visual Studio 17 2022" >> $GITHUB_ENV | |
echo "CMAKE_GENERATOR_PLATFORM=x64" >> $GITHUB_ENV | |
echo "FORCE_BUILD_LIBXML2=ON" >> $GITHUB_ENV | |
shell: bash | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt -r requirements-dev.txt | |
- name: Lint Python code with flake8 using .flake8 config file (Linux only) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
flake8 --count --show-source --statistics --config=.flake8 | |
- name: Lint C code with cpplint using script (Linux only) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
./.run_cpplint.sh | |
- name: Install AFDKO | |
run: | | |
python -m pip install . | |
python -m pip freeze --all | |
- name: Test with pytest | |
run: | | |
python -m pytest -n auto --dist loadfile --no-cov tests --color=yes | |
- name: Test uninstall AFDKO | |
run: | | |
python -m pip uninstall afdko -y |