diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdcf259..f5eaa9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,6 @@ on: branches: ["master"] env: - COMMITIZEN_VERSION: "2.4.1" COVERALLS_VERSION: "2.1.2" DEV_PYTHON_VERSION: "3.9" POETRY_VERSION: "1.1.4" @@ -21,46 +20,7 @@ env: TWINE_VERSION: "3.2.0" jobs: - commitizen: - name: "Check commit message" - - runs-on: "ubuntu-latest" - - steps: - - uses: "actions/checkout@v2.3.3" - - - name: "Fetch ${{ github.base_ref }}" - if: "github.event_name == 'pull_request'" - run: | - set -e - git fetch --depth=1 origin +refs/heads/${{ github.base_ref }}:refs/heads/${{ github.base_ref }} - git fetch --prune --unshallow - - - name: "Install Python" - if: "!startsWith(github.ref, 'refs/tags/')" - uses: "actions/setup-python@v2.1.4" - with: - python-version: "${{ env.DEV_PYTHON_VERSION }}" - - - name: "Install commitizen" - if: "!startsWith(github.ref, 'refs/tags/')" - run: "pip install commitizen==${{ env.COMMITIZEN_VERSION }}" - - - name: "Check pull request commit messages" - if: "github.event_name == 'pull_request'" - run: | - set -e - for commit in $(git log --pretty=%H ${{ github.base_ref }}..HEAD); do - echo "Checking commit: ${commit}" - cz check -m "$(git log -1 --pretty=%B ${commit})" - done - - - name: "Check last commit message" - if: "github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/')" - run: 'cz check -m "$(git log -1 --pretty=%B)"' - dev: - needs: ["commitizen"] name: "Verify package is installed well" strategy: @@ -70,7 +30,7 @@ jobs: runs-on: "${{ matrix.os }}" steps: - - uses: "actions/checkout@v2.3.3" + - uses: "actions/checkout@v2.3.4" - name: "Install Python" uses: "actions/setup-python@v2.1.4" @@ -101,7 +61,6 @@ jobs: run: "poetry run badabump-ci --help" test: - needs: ["commitizen"] name: "Python ${{ matrix.python-version }}" strategy: @@ -111,7 +70,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v2.3.3" + - uses: "actions/checkout@v2.3.4" - name: "Install Python" uses: "actions/setup-python@v2.1.4" @@ -151,7 +110,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v2.3.3" + - uses: "actions/checkout@v2.3.4" - name: "Install Python" uses: "actions/setup-python@v2.1.4" @@ -186,7 +145,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v2.3.3" + - uses: "actions/checkout@v2.3.4" - name: "Fetch git data" run: | diff --git a/.github/workflows/release_pr.yml b/.github/workflows/release_pr.yml index 804ae16..7b925ad 100644 --- a/.github/workflows/release_pr.yml +++ b/.github/workflows/release_pr.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v2.3.3" + - uses: "actions/checkout@v2.3.4" with: ref: "master" @@ -51,7 +51,7 @@ jobs: run: "poetry run python3 -m badabump --ci ${{ github.event.inputs.args }}" - id: "token" - uses: "tibdex/github-app-token@v1.1.0" + uses: "tibdex/github-app-token@v1.1.1" with: app_id: "${{ secrets.BADABUMP_APP_ID }}" private_key: "${{ secrets.BADABUMP_APP_PRIVATE_KEY }}" diff --git a/.github/workflows/release_tag.yml b/.github/workflows/release_tag.yml index 9a65c86..f850efe 100644 --- a/.github/workflows/release_tag.yml +++ b/.github/workflows/release_tag.yml @@ -20,12 +20,12 @@ jobs: steps: - id: "token" - uses: "tibdex/github-app-token@v1.1.0" + uses: "tibdex/github-app-token@v1.1.1" with: app_id: "${{ secrets.BADABUMP_APP_ID }}" private_key: "${{ secrets.BADABUMP_APP_PRIVATE_KEY }}" - - uses: "actions/checkout@v2.3.3" + - uses: "actions/checkout@v2.3.4" with: token: "${{ steps.token.outputs.token }}" ref: "master" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8b5dc17..544988f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: minimum_pre_commit_version: "1.17.0" repos: - repo: "https://github.com/commitizen-tools/commitizen" - rev: "v2.4.1" + rev: "v2.4.2" hooks: - id: "commitizen" # By default commitizen using `python3` instead `python` language, so @@ -31,7 +31,7 @@ repos: - "black==20.8b1" - repo: "https://github.com/pre-commit/pre-commit-hooks" - rev: "v3.2.0" + rev: "v3.3.0" hooks: - id: "end-of-file-fixer" - id: "trailing-whitespace" @@ -46,10 +46,10 @@ repos: name: "Lint code (flake8)" additional_dependencies: &flake8_additional_dependencies - "flake8==3.8.4" - - "flake8-broken-line==0.2.1" + - "flake8-broken-line==0.3.0" - "flake8-bugbear==20.1.4" - "flake8-builtins==1.5.3" - - "flake8-comprehensions==3.2.3" + - "flake8-comprehensions==3.3.0" - "flake8-eradicate==1.0.0" - "flake8-import-order==0.18.1" - "flake8-mutable==1.2.0" @@ -74,5 +74,5 @@ repos: hooks: - id: "mypy" name: "Lint code (mypy)" - args: ["--python-executable=.venv/bin/python3"] + args: ["--python-executable=./.venv/bin/python3"] exclude: ^docs/.*$ diff --git a/mypy.ini b/mypy.ini index fc04e7f..2e0d39c 100644 --- a/mypy.ini +++ b/mypy.ini @@ -9,8 +9,10 @@ disallow_untyped_decorators = True disallow_untyped_defs = True follow_imports = normal follow_imports_for_stubs = True -ignore_missing_imports = True +ignore_missing_imports = False +mypy_path = ./src/ namespace_packages = True +python_executable = ./.venv/bin/python3 show_column_numbers = True show_error_codes = True warn_redundant_casts = True diff --git a/pyproject.toml b/pyproject.toml index 8e493d9..f7b5036 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ badabump-ci = "badabump.cli.ci_app:main" "Bug Tracker" = "https://github.com/playpauseandstop/badabump/issues" [tool.pytest.ini_options] -minversion = "6.1.1" +minversion = "6.1.2" testpaths = ["tests/"] addopts = "--cov --no-cov-on-fail" log_level = "info"