diff --git a/.github/actions/semantic-tag-increment/action.yaml b/.github/actions/semantic-tag-increment/action.yaml index a7128c8..6b57b13 100644 --- a/.github/actions/semantic-tag-increment/action.yaml +++ b/.github/actions/semantic-tag-increment/action.yaml @@ -64,23 +64,22 @@ runs: ### CONTENT RECENTLY ADDED ### case "$TYPE" in - major) - ((MAJOR += 1)) - ((MINOR = 0)) - ((PATCH = 0)) - ;; - minor) - ((MINOR += 1)) - ((PATCH = 0)) - ;; - patch) - ((PATCH += 1)) - ;; + major) + ((MAJOR += 1)) + ((MINOR = 0)) + ((PATCH = 0)) + ;; + minor) + ((MINOR += 1)) + ((PATCH = 0)) + ;; + patch) + ((PATCH += 1)) + ;; esac - INCREMENTED="$MAJOR.$MINOR.$PATCH" + echo "$MAJOR.$MINOR.$PATCH" ### CONTENT REMOVED ### - echo "Incremented: ${INCREMENTED}" echo "tag=${TAG}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml index 9e73fc7..9bbd905 100644 --- a/.github/workflows/linting.yaml +++ b/.github/workflows/linting.yaml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: 2024 The Linux Foundation -name: "⛔️ Standalone Linting Checks" +name: "Standalone Linting Checks" # yamllint disable-line rule:truthy on: @@ -15,7 +15,7 @@ on: jobs: linting: - name: "Unsupported by pre-commit.ci" + # name: "Unsupported by pre-commit.ci" runs-on: "ubuntu-latest" # Don't run when pull request is merged if: github.event.pull_request.merged == false @@ -29,8 +29,47 @@ jobs: - name: "Checkout repository" uses: actions/checkout@v4 - - name: "Install linting tools" + - name: "Patch linting configuration" run: | + # Patch the linting configuration + # This step prevents a bunch of tools being installed + # (which substantically increases workflow execution time) + mv .pre-commit-config.yaml .pre-commit-config.yaml.previous + cat << 'EOF' > .pre-commit-config.yaml + --- + # SPDX-License-Identifier: Apache-2.0 + # SPDX-FileCopyrightText: 2024 The Linux Foundation + + ci: + autofix_commit_msg: "Chore: pre-commit autoupdate" + + exclude: | + (?x)^( + docs\/conf.py| + dco-signoffs/$ + )$ + + repos: + - repo: local + hooks: + - id: mypy-cache + name: "create mypy cache" + language: system + pass_filenames: false + entry: bash -c 'if [ ! -d .mypy_cache ]; then /bin/mkdir .mypy_cache; fi; exit 0' + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: "v1.11.0" + hooks: + - id: mypy + verbose: true + args: ["--show-error-codes", "--install-types", "--non-interactive"] + additional_dependencies: ["pytest", "types-requests"] + EOF + + - name: "Install linting dependencies" + run: | + # Install linting dependencies pip install --upgrade pip pip install pre-commit mypy