Hanno Böck commited on 2024-12-31 19:05:41
Zeige 2 geänderte Dateien mit 0 Einfügungen und 55 Löschungen.
... | ... |
@@ -1,28 +0,0 @@ |
1 |
---- |
|
2 |
-name: run tests |
|
3 |
-"on": |
|
4 |
- - pull_request |
|
5 |
- - push |
|
6 |
- |
|
7 |
-jobs: |
|
8 |
- build: |
|
9 |
- runs-on: ubuntu-latest |
|
10 |
- strategy: |
|
11 |
- matrix: |
|
12 |
- python-version: [3.8, 3.x, 3.13] |
|
13 |
- steps: |
|
14 |
- - uses: actions/checkout@v4 |
|
15 |
- - name: Set up Python ${{ matrix.python-version }} |
|
16 |
- uses: actions/setup-python@v5 |
|
17 |
- with: |
|
18 |
- python-version: ${{ matrix.python-version }} |
|
19 |
- - name: Install dependencies |
|
20 |
- run: | |
|
21 |
- python -m pip install --upgrade pip |
|
22 |
- #pip install -r requirements.txt |
|
23 |
- pip install pycodestyle pyflakes pylint dlint pyupgrade setuptools |
|
24 |
- - name: Run tests |
|
25 |
- env: |
|
26 |
- RUN_ONLINETESTS: 1 |
|
27 |
- run: | |
|
28 |
- python3 -m unittest |
... | ... |
@@ -1,27 +0,0 @@ |
1 |
-import glob |
|
2 |
-import subprocess |
|
3 |
-import unittest |
|
4 |
- |
|
5 |
- |
|
6 |
-class TestCodingstyle(unittest.TestCase): |
|
7 |
- @staticmethod |
|
8 |
- def test_codingstyle(): |
|
9 |
- pyfiles = ["freewvs", "update-freewvsdb", "setup.py", *glob.glob("tests/*.py")] |
|
10 |
- subprocess.run( |
|
11 |
- ["pycodestyle", "--ignore=W503,E501", "--max-line-length=88", *pyfiles], |
|
12 |
- check=True, |
|
13 |
- ) |
|
14 |
- subprocess.run(["pyflakes", *pyfiles], check=True) |
|
15 |
- |
|
16 |
- pylint_disable = ( |
|
17 |
- "missing-docstring,invalid-name,duplicate-code," |
|
18 |
- "too-many-arguments,consider-using-with,too-many-positional-arguments" |
|
19 |
- ) |
|
20 |
- subprocess.run(["pylint", f"--disable={pylint_disable}", *pyfiles], check=True) |
|
21 |
- |
|
22 |
- subprocess.run(["flake8", "--select=DUO", *pyfiles], check=True) |
|
23 |
- subprocess.run(["pyupgrade", "--py311-plus", *pyfiles], check=True) |
|
24 |
- |
|
25 |
- |
|
26 |
-if __name__ == "__main__": |
|
27 |
- unittest.main() |
|
28 | 0 |