Skip to content

Commit

Permalink
CI improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
wRAR committed Apr 1, 2024
1 parent 0a7cfdb commit 1c27cb9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
Expand Down
26 changes: 5 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
- python-version: '3.12'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -48,11 +48,11 @@ jobs:
fail-fast: false
matrix:
python-version: ['3.12']
tox-job: ["mypy", "docs"]
tox-job: ["mypy", "docs", "pre-commit", "twinecheck"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -62,19 +62,3 @@ jobs:
- name: tox
run: |
tox -e ${{ matrix.tox-job }}
pre-commit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit
- name: pre-commit linters
run: |
pre-commit install && pre-commit run --all-files
19 changes: 17 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ deps =
[testenv:mypy]
deps =
mypy==0.910

commands = mypy --ignore-missing-imports --no-warn-no-return url_matcher tests
commands =
mypy --ignore-missing-imports --no-warn-no-return url_matcher tests

[docs]
changedir = docs
Expand All @@ -35,3 +35,18 @@ changedir = {[docs]changedir}
deps = {[docs]deps}
commands =
sphinx-build -W -b html . {envtmpdir}/html

[testenv:pre-commit]
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure

[testenv:twinecheck]
basepython = python3
deps =
twine==5.0.0
build==1.2.1
commands =
python -m build --sdist
twine check dist/*

0 comments on commit 1c27cb9

Please sign in to comment.