Skip to content

Commit

Permalink
Switch to pre-commit.ci and twine check
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Mar 15, 2024
1 parent ba26a87 commit d0cb044
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
cache: pip

- name: Install project and dependencies
Expand All @@ -23,14 +23,20 @@ jobs:
- name: Run test suite
run: pytest -v --color=yes

check: # TODO: replace with pre-commit.ci
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip
- uses: pre-commit/[email protected]
env:
SKIP: no-commit-to-branch # only for local development
python-version: "3.12"
# cache: pip # TODO: cache tools

- name: Install tools
run: pip install twine build

- name: Build and check
run: |
python -m build
twine check dist/*.whl
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ addopts = [
xfail_strict = true

[tool.ruff]
# TODO: remove `target-version` when switching to PEP 621
target-version = "py39"
select = [
"F", # Pyflakes
"E", # Pycodestyle errors
Expand Down

0 comments on commit d0cb044

Please sign in to comment.