Skip to content

Remove flake8 upper-bound pinning and add nightly test for flake8 main #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 44 additions & 18 deletions .github/workflows/test_commit.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,77 @@
name: Test commit

on: [push, pull_request, workflow_dispatch]
on:
push:
pull_request:
workflow_dispatch:
schedule:
# Every day at 1 AM
- cron: '0 1 * * *'
# Every wednesday at 1 AM
- cron: '0 1 * * 3'

jobs:

# Test on all three platforms.
platform:
# Test on all supported Python versions and platforms
python_platform:

name: ${{ matrix.python }} (${{ matrix.os }})
if: github.event_name != 'schedule' || github.event.schedule == '0 1 * * 3'
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.optional || false }}

strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
matrix:
os: ['ubuntu-latest']
python: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
include:

runs-on: ${{ matrix.os }}
- os: windows-latest
python: '3.x'

- os: macos-latest
python: '3.x'

- python: '3.12-dev'
os: ubuntu-latest
optional: true

steps:
- name: Check out code.
uses: actions/checkout@v3

- name: Set up Python.
- name: Set up Python ${{ matrix.python }}.
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: ${{ matrix.python }}

- name: Install package.
run: pip install .[dev]

- name: Run tests.
run: pytest


# Test on all supported Python versions.
Python:
run: pytest

strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
# Test against Flake8 main
flake8_main:

name: Flake8 main
if: github.event_name != 'schedule' || github.event.schedule == '0 1 * * *'
runs-on: ubuntu-latest

# Uncomment to prevent failure from blocking
# continue-on-error: True

steps:
- name: Check out code.
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python }}.
- name: Set up latest stable Python.
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
python-version: "3.x"

- name: Install flake8 main
run: pip install git+https://github.com/PyCQA/flake8.git

- name: Install package.
run: pip install .[dev]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ readme = 'PyPI.md'
dynamic = ['version', 'description']
requires-python = '>= 3.6'
dependencies = [
'Flake8 >= 5, < 7',
'Flake8 >= 5',
'TOMLi; python_version < "3.11"',
'TOMLi < 2; python_version < "3.7"',
]
Expand Down