Skip to content

Commit 289073e

Browse files
authored
Merge branch 'master' into tfdocs-custom-markers
2 parents 588842e + 92fbec7 commit 289073e

File tree

14 files changed

+113
-44
lines changed

14 files changed

+113
-44
lines changed

.git_archival.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true)$

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git_archival.txt export-subst

.github/CONTRIBUTING.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# Notes for contributors
22

3-
1. Python hooks are supported now too. All you have to do is:
4-
1. add a line to the `console_scripts` array in `entry_points` in `setup.py`
5-
2. Put your python script in the `pre_commit_hooks` folder
6-
7-
Enjoy the clean, valid, and documented code!
8-
93
* [Run and debug hooks locally](#run-and-debug-hooks-locally)
104
* [Run hook performance test](#run-hook-performance-test)
115
* [Run via BASH](#run-via-bash)
@@ -18,6 +12,7 @@ Enjoy the clean, valid, and documented code!
1812
* [Prepare basic documentation](#prepare-basic-documentation)
1913
* [Add code](#add-code)
2014
* [Finish with the documentation](#finish-with-the-documentation)
15+
* [Contributing to Python code](#contributing-to-python-code)
2116

2217
## Run and debug hooks locally
2318

@@ -152,5 +147,38 @@ You can use [this PR](https://github.com/antonbabenko/pre-commit-terraform/pull/
152147
153148
### Finish with the documentation
154149
155-
1. Add hook description to [Available Hooks](../README.md#available-hooks).
150+
1. Add the hook description to [Available Hooks](../README.md#available-hooks).
156151
2. Create and populate a new hook section in [Hooks usage notes and examples](../README.md#hooks-usage-notes-and-examples).
152+
153+
## Contributing to Python code
154+
155+
1. [Install `tox`](https://tox.wiki/en/stable/installation.html)
156+
2. To run tests, run:
157+
158+
```bash
159+
tox -qq
160+
```
161+
162+
The easiest way to find out what parts of the code base are left uncovered, is to copy-paste and run the `python3 ...` command that will open the HTML report, so you can inspect it visually.
163+
164+
3. Before committing any changes (if you do not have `pre-commit` installed locally), run:
165+
166+
```bash
167+
tox r -qq -e pre-commit
168+
```
169+
170+
Make sure that all checks pass.
171+
172+
4. (Optional): If you want to limit the checks to MyPy only, you can run:
173+
174+
```bash
175+
tox r -qq -e pre-commit -- mypy --all-files
176+
```
177+
178+
Then copy-paste and run the `python3 ...` commands to inspect the strictest MyPy coverage reports visually.
179+
180+
5. (Optional): You can find all available `tox` environments by running:
181+
182+
```bash
183+
tox list
184+
```

.github/renovate.json5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
22
$schema: "https://docs.renovatebot.com/renovate-schema.json",
33
extends: ["local>SpotOnInc/renovate-config"],
4+
// To make happy 'Validate PR title' GHA
5+
commitMessageLowerCase: "never",
6+
// Disable auto-rebase on every commit to avoid reaching Github limits on macos runners
7+
rebaseWhen: "conflicted",
48
}

.github/workflows/build-image-test.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616

1717
runs-on: ${{ matrix.os }}
1818
steps:
19-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2020
with:
2121
fetch-depth: 0
2222

2323
- name: Get changed Docker related files
2424
id: changed-files-specific
2525
# yamllint disable-line rule:line-length
26-
uses: tj-actions/changed-files@d6babd6899969df1a11d14c368283ea4436bca78 # v44.5.2
26+
uses: tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6
2727
with:
2828
files: |
2929
Dockerfile
@@ -35,18 +35,18 @@ jobs:
3535
- name: Set up QEMU
3636
if: matrix.os != 'ubuntu-latest' || matrix.arch != 'amd64'
3737
# yamllint disable-line rule:line-length
38-
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
38+
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
3939
with:
4040
platforms: arm64
4141

4242
- name: Set up Docker Buildx
4343
# yamllint disable-line rule:line-length
44-
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
44+
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
4545

4646
- name: Build if Dockerfile changed
4747
if: steps.changed-files-specific.outputs.any_changed == 'true'
4848
# yamllint disable-line rule:line-length
49-
uses: docker/build-push-action@94f8f8c2eec4bc3f1d78c1755580779804cb87b2 # v6.0.1
49+
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
5050
with:
5151
context: .
5252
build-args: |
@@ -88,7 +88,7 @@ jobs:
8888
&& matrix.os == 'ubuntu-latest'
8989
&& matrix.arch == 'amd64'
9090
# yamllint disable-line rule:line-length
91-
uses: docker/build-push-action@94f8f8c2eec4bc3f1d78c1755580779804cb87b2 # v6.0.1
91+
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
9292
with:
9393
context: .
9494
build-args: |

.github/workflows/build-image.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1919
- name: Set up QEMU
2020
# yamllint disable-line rule:line-length
21-
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
21+
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
2222
- name: Set up Docker Buildx
2323
# yamllint disable-line rule:line-length
24-
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
24+
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
2525
- name: Login to GitHub Container Registry
2626
# yamllint disable-line rule:line-length
27-
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
27+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
2828
with:
2929
registry: ghcr.io
3030
username: ${{ github.repository_owner }}
@@ -39,12 +39,12 @@ jobs:
3939
4040
- name: Set up Docker Buildx
4141
# yamllint disable-line rule:line-length
42-
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
42+
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
4343

4444
- name: Build and Push release
4545
if: github.event_name != 'schedule'
4646
# yamllint disable-line rule:line-length
47-
uses: docker/build-push-action@94f8f8c2eec4bc3f1d78c1755580779804cb87b2 # v6.0.1
47+
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
4848
with:
4949
context: .
5050
build-args: |
@@ -62,7 +62,7 @@ jobs:
6262
- name: Build and Push nightly
6363
if: github.event_name == 'schedule'
6464
# yamllint disable-line rule:line-length
65-
uses: docker/build-push-action@94f8f8c2eec4bc3f1d78c1755580779804cb87b2 # v6.0.1
65+
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
6666
with:
6767
context: .
6868
build-args: |

.github/workflows/ci-cd.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,13 @@ jobs:
106106

107107
steps:
108108
- name: Switch to using Python 3.13 by default
109-
uses: actions/setup-python@v5
109+
# yamllint disable-line rule:line-length
110+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
110111
with:
111112
python-version: 3.13
112113
- name: Check out src from Git
113-
uses: actions/checkout@v4
114+
# yamllint disable-line rule:line-length
115+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
114116
with:
115117
fetch-depth: 0
116118
- name: >-
@@ -162,7 +164,8 @@ jobs:
162164
echo "dir=$(python -m pip cache dir)" >> "${GITHUB_OUTPUT}"
163165
shell: bash
164166
- name: Set up pip cache
165-
uses: actions/cache@v4
167+
# yamllint disable-line rule:line-length
168+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
166169
with:
167170
path: ${{ steps.pip-cache-dir.outputs.dir }}
168171
key: >-
@@ -268,12 +271,14 @@ jobs:
268271

269272
steps:
270273
- name: Switch to using Python 3.13
271-
uses: actions/setup-python@v5
274+
# yamllint disable-line rule:line-length
275+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
272276
with:
273277
python-version: 3.13
274278

275279
- name: Grab the source from Git
276-
uses: actions/checkout@v4
280+
# yamllint disable-line rule:line-length
281+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
277282
with:
278283
fetch-depth: 0
279284

@@ -301,7 +306,8 @@ jobs:
301306
run: >-
302307
echo "dir=$(python -m pip cache dir)" >> "${GITHUB_OUTPUT}"
303308
- name: Set up pip cache
304-
uses: actions/cache@v4
309+
# yamllint disable-line rule:line-length
310+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
305311
with:
306312
path: ${{ steps.pip-cache-dir.outputs.dir }}
307313
key: >-
@@ -359,7 +365,8 @@ jobs:
359365
>> "${GITHUB_OUTPUT}"
360366
working-directory: dist
361367
- name: Store the distribution packages
362-
uses: actions/upload-artifact@v4
368+
# yamllint disable-line rule:line-length
369+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
363370
with:
364371
name: >-
365372
${{ needs.pre-setup.outputs.dists-artifact-name }}

.github/workflows/pr-title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# Please look up the latest version from
1818
# https://github.com/amannn/action-semantic-pull-request/releases
1919
# yamllint disable-line rule:line-length
20-
- uses: amannn/action-semantic-pull-request@cfb60706e18bc85e8aec535e3c577abe8f70378e # v5.5.2
20+
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
2121
env:
2222
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2323
with:

.github/workflows/pre-commit.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
pre-commit:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
11+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1212
- run: >-
1313
git fetch --no-tags --prune --depth=1 origin
1414
+refs/heads/*:refs/remotes/origin/*
@@ -44,13 +44,13 @@ jobs:
4444
> hadolint
4545
&& chmod +x hadolint && sudo mv hadolint /usr/bin/
4646
# Need to success pre-commit fix push
47-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
47+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4848
with:
4949
fetch-depth: 0
5050
ref: ${{ github.event.pull_request.head.sha }}
5151
# Skip terraform_tflint which interferes to commit pre-commit auto-fixes
5252
# yamllint disable-line rule:line-length
53-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
53+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
5454
with:
5555
python-version: '3.9'
5656
- name: Execute pre-commit

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
with:
2525
persist-credentials: false
2626
fetch-depth: 0
2727

2828
- name: Release
2929
# yamllint disable-line rule:line-length
30-
uses: cycjimmy/semantic-release-action@cb425203a562475bca039ba4dbf90c7f9ac790f4 # v4.1.0
30+
uses: cycjimmy/semantic-release-action@b1b432f13acb7768e0c8efdec416d363a57546f2 # v4.1.1
3131
with:
3232
semantic_version: 18.0.0
3333
extra_plugins: |

0 commit comments

Comments
 (0)