Skip to content

Commit 71ee21a

Browse files
authored
git - Merge pull request #106 from DinoTools/update_ci_test
ci - Update ci scripts
2 parents 0faaa17 + f5e2b6a commit 71ee21a

File tree

7 files changed

+53
-54
lines changed

7 files changed

+53
-54
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: Tests
1+
# SPDX-FileCopyrightText: none
2+
# SPDX-License-Identifier: CC0-1.0
3+
4+
name: Python CI Tests
25

36
on:
47
push:
@@ -29,31 +32,23 @@ jobs:
2932
- {name: Windows, python: '3.9', os: windows-latest, tox: py39}
3033
# ToDo: There are errors on Mac, but I don't know why: Connection timeout or reset
3134
# - {name: Mac, python: '3.9', os: macos-latest, tox: py39}
35+
- {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311}
36+
- {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
37+
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
3238
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
3339
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
34-
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
35-
- {name: 'PyPy', python: pypy3, os: ubuntu-latest, tox: pypy3}
40+
- {name: 'PyPy 3.9', python: pypy3.9, os: ubuntu-latest, tox: pypy39}
3641

3742
steps:
38-
- uses: "actions/checkout@v2"
39-
- uses: "actions/setup-python@v2"
43+
- uses: "actions/checkout@v3"
44+
45+
- uses: "actions/setup-python@v4"
4046
with:
4147
python-version: ${{ matrix.python }}
42-
- name: update pip
43-
run: |
44-
python -VV
45-
python -m site
46-
pip install -U wheel
47-
pip install -U setuptools
48-
python -m pip install -U pip
49-
- name: get pip cache dir
50-
id: pip-cache
51-
run: echo "::set-output name=dir::$(pip cache dir)"
52-
- name: cache pip
53-
uses: actions/cache@v2
54-
with:
55-
path: ${{ steps.pip-cache.outputs.dir }}
56-
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}
57-
- run: pip install tox
48+
cache: 'pip' # caching pip dependencies
49+
50+
- name: Install tox and any other packages
51+
run: pip install tox
52+
5853
- name: "Run tox targets for ${{ matrix.python }}"
5954
run: tox -e ${{ matrix.tox }}

.github/workflows/pre-commit.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,30 @@
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v3.2.0
6+
rev: v4.4.0
77
hooks:
8-
# Forbid files which have a UTF-8 byte-order marker
9-
- id: check-byte-order-marker
8+
# Prevent giant files from being committed
9+
- id: check-added-large-files
10+
# Simply check whether files parse as valid python
11+
- id: check-ast
1012
# Require literal syntax when initializing empty or zero Python builtin types
1113
- id: check-builtin-literals
1214
# Check for files that would conflict in case-insensitive filesystems
1315
- id: check-case-conflict
16+
# Checks for a common error of placing code before the docstring
17+
- id: check-docstring-first
1418
# Ensures that (non-binary) executables have a shebang
1519
- id: check-executables-have-shebangs
1620
# Check for files that contain merge conflict strings
1721
- id: check-merge-conflict
22+
# Checks that scripts with shebangs are executable
23+
- id: check-shebang-scripts-are-executable
1824
# Checks for symlinks which do not point to anything
1925
- id: check-symlinks
2026
# This hook checks yaml files for parseable syntax
2127
- id: check-yaml
22-
files: .drone.yml
23-
# Drone CI config allows and requires multiple documents
24-
args: [--allow-multiple-documents]
25-
- id: check-yaml
26-
exclude: .drone.yml
28+
# Check for debugger imports and py37+ breakpoint() calls in python source
29+
- id: debug-statements
2730
# Detects the presence of private keys
2831
- id: detect-private-key
2932
# Ensures that a file is either empty, or ends with one newline
@@ -37,36 +40,39 @@ repos:
3740
exclude: ^tests/(json|response|xml)/
3841

3942
- repo: https://github.com/pre-commit/pygrep-hooks
40-
rev: v1.6.0
43+
rev: v1.10.0
4144
hooks:
4245
# Enforce that `noqa` annotations always occur with specific codes
4346
- id: python-check-blanket-noqa
47+
# Enforce that # type: ignore annotations always occur with specific codes
48+
- id: python-check-blanket-type-ignore
4449
# Prevent common mistakes of `assert mck.not_called()`, `assert mck.called_once_with(...)` and `mck.assert_called`
4550
- id: python-check-mock-methods
4651
# A quick check for the `eval()` built-in function
4752
- id: python-no-eval
4853
# A quick check for the deprecated `.warn()` method of python loggers
4954
- id: python-no-log-warn
50-
# ToDo: Fix code
51-
# # Enforce that python3.6+ type annotations are used instead of type comments
52-
# - id: python-use-type-annotations
55+
# Enforce that python3.6+ type annotations are used instead of type comments
56+
- id: python-use-type-annotations
5357
# Detect common mistake of using single backticks when writing rst
5458
- id: rst-backticks
59+
# Detect mistake of rst directive not ending with double colon
60+
- id: rst-directive-colons
5561
# Detect mistake of inline code touching normal text in rst
5662
- id: rst-inline-touching-normal
5763
# Forbid files which have a UTF-8 Unicode replacement character
5864
- id: text-unicode-replacement-char
5965

60-
- repo: https://gitlab.com/pycqa/flake8
61-
rev: 3.8.2
66+
- repo: https://github.com/PyCQA/flake8
67+
rev: 6.0.0
6268
hooks:
6369
- id: flake8
6470
additional_dependencies:
6571
- flake8-bugbear
6672
- flake8-implicit-str-concat
6773

6874
- repo: https://github.com/pre-commit/mirrors-mypy
69-
rev: v0.782
75+
rev: v1.3.0
7076
hooks:
7177
- id: mypy
7278
args: [--no-strict-optional, --ignore-missing-imports, --allow-untyped-global]
@@ -76,7 +82,15 @@ repos:
7682
# # The REUSE helper tool assists with achieving and confirming REUSE compliance.
7783
# # See: https://reuse.software/
7884
# - repo: https://github.com/fsfe/reuse-tool
79-
# rev: v0.11.1
85+
# rev: v1.1.2
8086
# hooks:
8187
# - id: reuse
8288
# exclude: ^tests/(json|response|xml)/
89+
90+
ci:
91+
autofix_commit_msg: |
92+
* - auto fixes from pre-commit hooks
93+
94+
for more information, see https://pre-commit.ci
95+
autofix_prs: false
96+
autoupdate_commit_msg: 'ci - pre-commit autoupdate'

docs/source/conf.py

100644100755
File mode changed.

examples/get_areas.py

100644100755
File mode changed.

setup.py

100644100755
File mode changed.

tox.ini

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
# SPDX-FileCopyrightText: none
2+
# SPDX-License-Identifier: CC0-1.0
3+
14
[tox]
2-
envlist = py36,py37,py38,py39,pypy3
5+
envlist = py37,py38,py39,py310,py311,pypy39
36

47
[testenv]
58
deps =
@@ -9,8 +12,9 @@ commands = pytest --cov overpy --cov-report=term-missing -v tests/
912

1013
[gh-actions]
1114
python =
12-
3.6: py36
1315
3.7: py37
1416
3.8: py38
1517
3.9: py39
16-
pypy3: pypy3
18+
3.10: py310
19+
3.11: py311
20+
pypy3.9: pypy39

0 commit comments

Comments
 (0)