pylint-pytest
and pytest>8.2.1
create a weird error for pylint
#331
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: Testing | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
python-version: | |
- '3.6' | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
# - '3.12' # FixMe: https://github.com/pylint-dev/pylint-pytest/issues/3 | |
# Python 3.6 is not available in `ubuntu-latest`. | |
exclude: | |
- python-version: '3.6' | |
os: ubuntu-latest | |
include: | |
- python-version: '3.6' | |
os: ubuntu-20.04 | |
defaults: | |
run: | |
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || '/bin/bash --noprofile --norc -Eeuxo pipefail {0}' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Slugify GITHUB_REPOSITORY (win) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
$slug = $env:GITHUB_REPOSITORY -replace '/', '_' | |
echo "GITHUB_REPOSITORY_SLUG=$slug" | tee -Append $env:GITHUB_ENV | |
- name: Slugify GITHUB_REPOSITORY (non-win) | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: echo "GITHUB_REPOSITORY_SLUG=${GITHUB_REPOSITORY////_}" >> $GITHUB_ENV | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: setup.py | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox | |
- name: Test with tox | |
env: | |
FORCE_COLOR: 1 | |
PYTEST_CI_ARGS: --cov-report=xml --junitxml=test_artifacts/test_report.xml --color=yes | |
run: tox ${{ matrix.python-version == '3.6' && '--skip-missing-interpreters=true' || '' }} | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: ${{ matrix.os }},${{ matrix.python-version }} | |
fail_ci_if_error: true | |
files: test_artifacts/cobertura.xml | |
- name: Create artifacts | |
uses: actions/upload-artifact@v3 | |
if: ${{ !cancelled() }} | |
with: | |
name: ${{ env.GITHUB_REPOSITORY_SLUG }}_test-artifacts_${{ github.event_name }}_${{ github.event.pull_request.number || github.sha }}_${{ matrix.os | |
}}_py${{ matrix.python-version }} | |
path: test_artifacts/ |