Skip to content
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
12 changes: 0 additions & 12 deletions .github/workflows/black.yml

This file was deleted.

28 changes: 16 additions & 12 deletions .github/workflows/pythonpackage.yml → .github/workflows/ci.yml
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/action@v3.0.0

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:
Expand Down
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tool.black]
line-length = 120
skip-string-normalization = true
target-version = ['py36', 'py37', 'py38']
exclude = '''
target-version = ['py38', 'py39', 'py310', 'py311']
force-exclude = '''
(
/(
\.eggs # exclude a few common directories in the
Expand Down
3 changes: 0 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ universal = 1
[flake8]
exclude = docs, .git, __pycache__
max-line-length = 120
per-file-ignores = __init__.py:F401
6 changes: 3 additions & 3 deletions tox.ini
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