diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 4e53aea..8c54d20 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -6,7 +6,6 @@ name: Build on: push: branches: ["*"] - pull_request: [master] tags: ["v*.*.*"] jobs: @@ -18,60 +17,23 @@ jobs: matrix: os: [ubuntu-latest] python_version: - - "3.9" - "3.10" - "3.11" + - "3.12" include: - os: windows-latest - python_version: "3.9" + python_version: "3.10" 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: + cache: pip + cache-dependency-path: pyproject.toml python-version: ${{matrix.python_version}} - - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{runner.os}}-pip-${{hashFiles('pyproject.toml')}} - restore-keys: | - ${{runner.os}}-pip- - ${{runner.os}}- - name: Upgrade Pip - run: |- - python -m pip install -U pip + run: python -m pip install -U pip - name: Install test dependencies - run: |- - python -m pip install '.[test]' + run: python -m pip install '.[test]' - name: Run unit tests - run: |- - python -m pytest --cov-report=term --cov=capella_git_hooks --rootdir=. - -# publish: -# name: Publish artifacts -# runs-on: ubuntu-latest -# needs: test -# steps: -# - uses: actions/checkout@v2 -# - name: Setup Python -# uses: actions/setup-python@v2 -# with: -# python-version: "3.9" -# - name: Install dependencies -# run: |- -# python -m pip install -U pip -# python -m pip install build twine -# - name: Build packages -# run: |- -# python -m build -# - name: Verify packages -# run: |- -# python -m twine check dist/* -# - name: Upload artifacts -# uses: actions/upload-artifact@v2 -# with: -# name: Artifacts -# path: 'dist/*' -# - name: Publish to PyPI (release only) -# if: startsWith(github.ref, 'refs/tags/v') -# run: python -m twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} --non-interactive dist/* + run: python -m pytest --cov-report=term --cov=capella_git_hooks --rootdir=. diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 53da3d1..c671874 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,12 +13,13 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 with: - python-version: "3.9" + cache: pip + python-version: "3.10" - name: Upgrade pip run: | python -m pip install -U pip @@ -32,7 +33,7 @@ jobs: run: | make -C docs html - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: force_orphan: true github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 076965d..c418468 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,10 +11,11 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: "3.9" + cache: pip + python-version: "3.10" - name: Upgrade pip run: |- python -m pip install -U pip @@ -27,10 +28,11 @@ jobs: pylint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: "3.9" + cache: pip + python-version: "3.10" - name: Upgrade pip run: |- python -m pip install -U pip diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index caf8bff..c3042ed 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,10 +2,10 @@ # SPDX-License-Identifier: CC0-1.0 default_install_hook_types: [commit-msg, pre-commit] -default_stages: [commit, merge-commit] +default_stages: [pre-commit, pre-merge-commit] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -26,15 +26,15 @@ repos: - id: fix-byte-order-marker - id: trailing-whitespace - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.9.1 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/PyCQA/docformatter - rev: v1.7.5 + rev: eb1df347edd128b30cd3368dddc3aa65edcfac38 hooks: - id: docformatter additional_dependencies: @@ -47,11 +47,11 @@ repos: additional_dependencies: - pydocstyle[toml] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 + rev: v1.13.0 hooks: - id: mypy - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.4.2 + rev: v1.5.5 hooks: - id: insert-license name: Insert license headers (shell-style comments) @@ -94,10 +94,10 @@ repos: - --comment-style - '..| |' - repo: https://github.com/fsfe/reuse-tool - rev: v2.1.0 + rev: v5.0.2 hooks: - id: reuse - repo: https://github.com/qoomon/git-conventional-commits - rev: v2.6.5 + rev: v2.6.7 hooks: - id: conventional-commits diff --git a/pyproject.toml b/pyproject.toml index f7d63fd..3e8f456 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,15 +88,8 @@ python_version = "3.9" [[tool.mypy.overrides]] module = ["tests.*"] -allow_incomplete_defs = true -allow_untyped_defs = true - -[[tool.mypy.overrides]] -# Untyped third party libraries -module = [ - # ... -] -ignore_missing_imports = true +disallow_incomplete_defs = false +disallow_untyped_defs = false [tool.pydocstyle] convention = "numpy" diff --git a/tests/test_capella_git_hooks.py b/tests/test_capella_git_hooks.py index 0a39ea8..8b2c255 100644 --- a/tests/test_capella_git_hooks.py +++ b/tests/test_capella_git_hooks.py @@ -4,5 +4,4 @@ import capella_git_hooks -def test_add_some_tests_here(): - ... +def test_add_some_tests_here(): ...