Skip to content

Bump actions/checkout from 5 to 6 in the github-actions group (#557) #235

Bump actions/checkout from 5 to 6 in the github-actions group (#557)

Bump actions/checkout from 5 to 6 in the github-actions group (#557) #235

name: Check code and run tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.1
build:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"] # ["2.7", "3.6", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
pip install ".[testing]"
- name: Analysing the code with flake8
run: |
# F824 `global name` / `nonlocal name` is unused: name is never assigned in scope
flake8 . --count --select=E9,F63,F7,F82 --ignore=F824 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
- name: Running tests
run: |
pytest --version
# make install test work...
export PYTHONPATH=$(python -m site --user-site)
pytest tests/ --ignore=tests/system/data/ --showlocals --verbose --show-capture=all --log-level=debug