-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: CI Merge Linter & Unit Tests into single config * ci: Drop testing for 3.6 and 3.7, add 3.10, 3.11 & 3.12 * chore: Add Pre Commit Config * Bump linting tools * Update config to match behaviour * build: Skip import errors by flake8 in __init__ * build: Update envlist in tox.ini * ci: Setup pre-commit runner, bump other actions * chore: Remov 3.12 from CI until stable release * build: Remove black dev-dependency, use pre-commit * build: Update tox envlist to remove 3.12 * chore: Remove py312 as black target
- Loading branch information
1 parent
30574f9
commit a1b0c82
Showing
7 changed files
with
47 additions
and
32 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
28 changes: 16 additions & 12 deletions
28
.github/workflows/pythonpackage.yml → .github/workflows/ci.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
name: Unit Tests | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- uses: pre-commit/[email protected] | ||
|
||
test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
max-parallel: 5 | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-dev.txt | ||
pip install "coveralls<3.0.0" | ||
run: python -m pip install -U pip -r requirements-dev.txt "coveralls<3.0.0" | ||
|
||
- name: Run test suite | ||
env: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
exclude: '.git' | ||
default_stages: [commit] | ||
fail_fast: false | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
files: "pypika.*" | ||
exclude: ".*json$|.*txt$|.*csv|.*md|.*svg" | ||
- id: check-yaml | ||
- id: no-commit-to-branch | ||
args: ['--branch', 'master'] | ||
- id: check-merge-conflict | ||
- id: check-ast | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.9.1 | ||
hooks: | ||
- id: black |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,3 @@ tox==3.14.3 | |
tox-venv==0.4.0 | ||
tox-gh-actions==0.3.0 | ||
coverage==5.1 | ||
|
||
# Formatting | ||
black==21.5b1 |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
[tox] | ||
envlist = py36,py37,py38,py39,pypy3 | ||
envlist = py38,py39,py310,py311,pypy3 | ||
[testenv] | ||
deps = -r requirements-dev.txt | ||
commands = | ||
coverage run | ||
coverage xml | ||
[gh-actions] | ||
python = | ||
3.6: py36 | ||
3.7: py37 | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
3.11: py311 |