Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
goanpeca committed Oct 11, 2022
1 parent 89ef0db commit d502ee3
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 17 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/pre_commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: pre-commit

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest]
python-version: ['3.10']

steps:
- uses: actions/checkout@v3

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

- name: Install dependencies
run: |
cd constructor-updater
python -m pip install --upgrade pip
python -m pip install pre-commit
pip list
- name: Pre-commit
run: |
cd constructor-updater
pre-commit run -a
13 changes: 2 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
run: |
cd constructor-updater
python -m pip install --upgrade pip
python -m pip install setuptools tox tox-gh-actions pre-commit mypy
python -m pip install setuptools tox tox-gh-actions
pip list
# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
Expand All @@ -39,13 +40,3 @@ jobs:
python -m tox
env:
PLATFORM: ${{ matrix.platform }}

- name: Pre-commit
run: |
cd constructor-updater
pre-commit run -a
- name: Typing
run: |
cd constructor-updater
mypy src
39 changes: 39 additions & 0 deletions .github/workflows/typing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: typing

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest]
python-version: ['3.10']

steps:
- uses: actions/checkout@v3

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

- name: Install dependencies
run: |
cd constructor-updater
python -m pip install --upgrade pip
python -m pip install mypy typing-extensions types-requests types-urllib3 typing-inspect mypy-extensions
pip list
- name: Typing
run: |
cd constructor-updater
mypy src
6 changes: 0 additions & 6 deletions constructor-updater/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,3 @@ line-length = 79
[tool.isort]
profile = "black"
line_length = 79

[mypy]
exclude = [
'*tests*',
'*test*'
]
6 changes: 6 additions & 0 deletions constructor-updater/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@ testing =
mypy
typing-extensions
types-requests

[mypy]
exclude = venv|tests

[mypy-packaging.*]
ignore_missing_imports = True

0 comments on commit d502ee3

Please sign in to comment.