repokeeper 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.github/workflows/commitlint.yml +49 -0
  2. package/.github/workflows/release-please.yml +59 -0
  3. package/.github/workflows/repokeeper-check.yml +30 -0
  4. package/.github/workflows/stack-dart.yml +72 -0
  5. package/.github/workflows/stack-dotnet.yml +68 -0
  6. package/.github/workflows/stack-go.yml +59 -0
  7. package/.github/workflows/stack-java.yml +70 -0
  8. package/.github/workflows/stack-node.yml +85 -0
  9. package/.github/workflows/stack-php.yml +66 -0
  10. package/.github/workflows/stack-python.yml +70 -0
  11. package/.github/workflows/stack-ruby.yml +65 -0
  12. package/.github/workflows/stack-rust.yml +60 -0
  13. package/.github/workflows/stack-script.yml +87 -0
  14. package/README.md +60 -106
  15. package/dist/cli.js +52 -9
  16. package/dist/commands/bump.js +30 -0
  17. package/dist/commands/context.js +19 -2
  18. package/dist/commands/eject.js +74 -0
  19. package/dist/commands/gitlab.js +46 -0
  20. package/dist/commands/init.js +104 -10
  21. package/dist/commands/presets.js +114 -0
  22. package/dist/commands/report.js +7 -5
  23. package/dist/commands/update.js +3 -2
  24. package/dist/config/schema.js +40 -1
  25. package/dist/duplicates.js +2 -2
  26. package/dist/errors.js +1 -1
  27. package/dist/gitlab/api.js +50 -0
  28. package/dist/gitlab/settings.js +181 -0
  29. package/dist/model.js +8 -0
  30. package/dist/modules/commits.js +3 -2
  31. package/dist/modules/deps.js +1 -1
  32. package/dist/modules/health.js +3 -3
  33. package/dist/modules/hooks.js +7 -5
  34. package/dist/modules/release.js +18 -5
  35. package/dist/platforms/github.js +70 -12
  36. package/dist/platforms/gitlab-jobs.js +191 -0
  37. package/dist/platforms/gitlab.js +53 -13
  38. package/dist/release/bump.js +223 -0
  39. package/dist/stacks/index.js +56 -0
  40. package/dist/stacks/support.js +19 -0
  41. package/dist/templates.js +13 -1
  42. package/dist/version.js +3 -0
  43. package/package.json +6 -2
@@ -0,0 +1,49 @@
1
+ name: commitlint
2
+
3
+ on:
4
+ workflow_call: {}
5
+
6
+ permissions:
7
+ contents: read
8
+
9
+ jobs:
10
+ commitlint:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: read
14
+ steps:
15
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
16
+ with:
17
+ fetch-depth: 0
18
+ persist-credentials: false
19
+ - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
20
+ with:
21
+ node-version: "24"
22
+ - name: Install commitlint
23
+ run: |
24
+ dir="$RUNNER_TEMP/commitlint"
25
+ mkdir -p "$dir"
26
+ cd "$dir"
27
+ echo '{ "private": true }' > package.json
28
+ npm install --no-audit --no-fund @commitlint/cli@21.2.3 @commitlint/config-conventional@21.2.3
29
+ cat > commitlint.config.mjs <<'EOF'
30
+ export default {
31
+ extends: ["@commitlint/config-conventional"],
32
+ rules: { "header-max-length": [2, "always", 100] },
33
+ // Dependabot writes "Bump x" whatever prefix it is given; its commits carry this sign-off
34
+ ignores: [(message) => message.includes("Signed-off-by: dependabot[bot] <support@github.com>")],
35
+ };
36
+ EOF
37
+ - name: Check commit messages
38
+ env:
39
+ EVENT: ${{ github.event_name }}
40
+ BASE: ${{ github.event.pull_request.base.sha }}
41
+ HEAD: ${{ github.event.pull_request.head.sha }}
42
+ run: |
43
+ dir="$RUNNER_TEMP/commitlint"
44
+ lint() { "$dir/node_modules/.bin/commitlint" --config "$dir/commitlint.config.mjs" --verbose "$@"; }
45
+ if [ "$EVENT" = "pull_request" ]; then
46
+ lint --from "$BASE" --to "$HEAD"
47
+ else
48
+ lint --last
49
+ fi
@@ -0,0 +1,59 @@
1
+ name: release-please
2
+
3
+ on:
4
+ workflow_call:
5
+ secrets:
6
+ token:
7
+ description: Token for release-please. GITHUB_TOKEN is used when absent, but its pull requests do not trigger CI.
8
+ required: false
9
+ outputs:
10
+ release_created:
11
+ description: "'true' when this run created a release"
12
+ value: ${{ jobs.release-please.outputs.release_created }}
13
+ tag_name:
14
+ description: Tag of the release, such as v1.2.0
15
+ value: ${{ jobs.release-please.outputs.tag_name }}
16
+ version:
17
+ description: Version of the release, such as 1.2.0
18
+ value: ${{ jobs.release-please.outputs.version }}
19
+ major:
20
+ description: Major version of the release
21
+ value: ${{ jobs.release-please.outputs.major }}
22
+ pr_branch:
23
+ description: Branch of the release pull request this run opened or updated with GITHUB_TOKEN, whose pull_request runs GitHub holds for approval; empty otherwise
24
+ value: ${{ jobs.release-please.outputs.pr_branch }}
25
+
26
+ permissions:
27
+ contents: read
28
+
29
+ jobs:
30
+ release-please:
31
+ runs-on: ubuntu-latest
32
+ permissions:
33
+ contents: write
34
+ pull-requests: write
35
+ issues: write
36
+ outputs:
37
+ release_created: ${{ steps.release.outputs.release_created }}
38
+ tag_name: ${{ steps.release.outputs.tag_name }}
39
+ version: ${{ steps.release.outputs.version }}
40
+ major: ${{ steps.release.outputs.major }}
41
+ pr_branch: ${{ steps.pr.outputs.branch }}
42
+ steps:
43
+ - id: release
44
+ uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
45
+ with:
46
+ token: ${{ secrets.token || github.token }}
47
+ config-file: release-please-config.json
48
+ manifest-file: .release-please-manifest.json
49
+ - name: Release pull request branch
50
+ id: pr
51
+ if: steps.release.outputs.prs_created == 'true'
52
+ env:
53
+ PR: ${{ steps.release.outputs.pr }}
54
+ OWN_TOKEN: ${{ secrets.token != '' }}
55
+ run: |
56
+ # a pull request opened with the caller's own token starts CI by itself
57
+ if [ "$OWN_TOKEN" = "false" ]; then
58
+ echo "branch=$(jq -r .headBranchName <<<"$PR")" >> "$GITHUB_OUTPUT"
59
+ fi
@@ -0,0 +1,30 @@
1
+ name: repokeeper-check
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ version:
7
+ description: repokeeper version to run; the one that wrote the repository's standard
8
+ type: string
9
+ required: true
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ check:
16
+ name: repokeeper check
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: read
20
+ steps:
21
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
+ with:
23
+ persist-credentials: false
24
+ - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
25
+ with:
26
+ node-version: "24"
27
+ - name: Check the repository against its standard
28
+ env:
29
+ VERSION: ${{ inputs.version }}
30
+ run: npx --yes "repokeeper@$VERSION" check
@@ -0,0 +1,72 @@
1
+ name: stack-dart
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ sdk-versions:
7
+ description: JSON list of Dart SDK versions, or Flutter channels when flutter is true
8
+ type: string
9
+ default: '["stable"]'
10
+ os:
11
+ description: JSON list of runner labels
12
+ type: string
13
+ default: '["ubuntu-latest"]'
14
+ flutter:
15
+ description: '"true" to set up Flutter instead of the Dart SDK'
16
+ type: string
17
+ default: "false"
18
+ install-command:
19
+ description: Command that fetches the packages
20
+ type: string
21
+ default: dart pub get
22
+ commands:
23
+ description: JSON list of shell commands run in order
24
+ type: string
25
+ default: '["dart format --output=none --set-exit-if-changed .","dart analyze"]'
26
+ working-directory:
27
+ description: Directory holding pubspec.yaml
28
+ type: string
29
+ default: .
30
+
31
+ permissions:
32
+ contents: read
33
+
34
+ jobs:
35
+ dart:
36
+ name: ${{ inputs.flutter == 'true' && 'flutter' || 'dart' }} ${{ matrix.sdk }} (${{ matrix.os }})
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ os: ${{ fromJSON(inputs.os) }}
41
+ sdk: ${{ fromJSON(inputs.sdk-versions) }}
42
+ runs-on: ${{ matrix.os }}
43
+ permissions:
44
+ contents: read
45
+ defaults:
46
+ run:
47
+ shell: bash
48
+ working-directory: ${{ inputs.working-directory }}
49
+ steps:
50
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
51
+ with:
52
+ persist-credentials: false
53
+ - if: inputs.flutter == 'true'
54
+ uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
55
+ with:
56
+ channel: ${{ matrix.sdk }}
57
+ cache: true
58
+ - if: inputs.flutter != 'true'
59
+ uses: dart-lang/setup-dart@6afc89df92d6eb3834022f73cd65adc8cdfcb92d # v1.8.1
60
+ with:
61
+ sdk: ${{ matrix.sdk }}
62
+ - name: Install dependencies
63
+ run: ${{ inputs.install-command }}
64
+ - name: Run checks
65
+ env:
66
+ COMMANDS: ${{ inputs.commands }}
67
+ run: |
68
+ node -e 'for (const c of JSON.parse(process.env.COMMANDS)) console.log(c)' | while IFS= read -r command; do
69
+ echo "::group::$command"
70
+ bash -c "$command" </dev/null
71
+ echo "::endgroup::"
72
+ done
@@ -0,0 +1,68 @@
1
+ name: stack-dotnet
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ dotnet-versions:
7
+ description: JSON list of .NET SDK versions, all installed side by side
8
+ type: string
9
+ default: '["8.0","9.0"]'
10
+ os:
11
+ description: JSON list of runner labels
12
+ type: string
13
+ default: '["ubuntu-latest"]'
14
+ commands:
15
+ description: JSON list of shell commands run in order
16
+ type: string
17
+ default: '["dotnet restore","dotnet format --verify-no-changes --no-restore","dotnet build --no-restore","dotnet test --no-build"]'
18
+ working-directory:
19
+ description: Directory holding the solution or project
20
+ type: string
21
+ default: .
22
+
23
+ permissions:
24
+ contents: read
25
+
26
+ jobs:
27
+ dotnet:
28
+ name: dotnet (${{ matrix.os }})
29
+ strategy:
30
+ fail-fast: false
31
+ matrix:
32
+ os: ${{ fromJSON(inputs.os) }}
33
+ runs-on: ${{ matrix.os }}
34
+ permissions:
35
+ contents: read
36
+ defaults:
37
+ run:
38
+ shell: bash
39
+ working-directory: ${{ inputs.working-directory }}
40
+ env:
41
+ DOTNET_CLI_TELEMETRY_OPTOUT: "1"
42
+ DOTNET_NOLOGO: "1"
43
+ steps:
44
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
45
+ with:
46
+ persist-credentials: false
47
+ - id: sdks
48
+ name: List the SDK versions
49
+ env:
50
+ VERSIONS: ${{ inputs.dotnet-versions }}
51
+ run: |
52
+ {
53
+ echo "list<<EOF"
54
+ node -e 'for (const v of JSON.parse(process.env.VERSIONS)) console.log(v)'
55
+ echo "EOF"
56
+ } >> "$GITHUB_OUTPUT"
57
+ - uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
58
+ with:
59
+ dotnet-version: ${{ steps.sdks.outputs.list }}
60
+ - name: Run checks
61
+ env:
62
+ COMMANDS: ${{ inputs.commands }}
63
+ run: |
64
+ node -e 'for (const c of JSON.parse(process.env.COMMANDS)) console.log(c)' | while IFS= read -r command; do
65
+ echo "::group::$command"
66
+ bash -c "$command" </dev/null
67
+ echo "::endgroup::"
68
+ done
@@ -0,0 +1,59 @@
1
+ name: stack-go
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ go-versions:
7
+ description: JSON list of Go versions for actions/setup-go ("stable", "1.24")
8
+ type: string
9
+ default: '["stable"]'
10
+ os:
11
+ description: JSON list of runner labels
12
+ type: string
13
+ default: '["ubuntu-latest"]'
14
+ commands:
15
+ description: JSON list of shell commands run in order
16
+ type: string
17
+ default: '["go vet ./...","go test ./..."]'
18
+ working-directory:
19
+ description: Directory holding go.mod
20
+ type: string
21
+ default: .
22
+
23
+ permissions:
24
+ contents: read
25
+
26
+ jobs:
27
+ go:
28
+ name: go ${{ matrix.go }} (${{ matrix.os }})
29
+ strategy:
30
+ fail-fast: false
31
+ matrix:
32
+ os: ${{ fromJSON(inputs.os) }}
33
+ go: ${{ fromJSON(inputs.go-versions) }}
34
+ runs-on: ${{ matrix.os }}
35
+ permissions:
36
+ contents: read
37
+ defaults:
38
+ run:
39
+ shell: bash
40
+ working-directory: ${{ inputs.working-directory }}
41
+ steps:
42
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
43
+ with:
44
+ persist-credentials: false
45
+ - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
46
+ with:
47
+ go-version: ${{ matrix.go }}
48
+ # modules without dependencies have no go.sum to key the cache on
49
+ cache: ${{ hashFiles(format('{0}/go.sum', inputs.working-directory)) != '' }}
50
+ cache-dependency-path: ${{ inputs.working-directory }}/go.sum
51
+ - name: Run checks
52
+ env:
53
+ COMMANDS: ${{ inputs.commands }}
54
+ run: |
55
+ node -e 'for (const c of JSON.parse(process.env.COMMANDS)) console.log(c)' | while IFS= read -r command; do
56
+ echo "::group::$command"
57
+ bash -c "$command" </dev/null
58
+ echo "::endgroup::"
59
+ done
@@ -0,0 +1,70 @@
1
+ name: stack-java
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ java-versions:
7
+ description: JSON list of Java versions (Temurin)
8
+ type: string
9
+ default: '["17","21"]'
10
+ os:
11
+ description: JSON list of runner labels
12
+ type: string
13
+ default: '["ubuntu-latest"]'
14
+ build-tool:
15
+ description: maven or gradle
16
+ type: string
17
+ default: maven
18
+ gradle-version:
19
+ description: Gradle version to install; empty to use the wrapper
20
+ type: string
21
+ default: ""
22
+ commands:
23
+ description: JSON list of shell commands run in order
24
+ type: string
25
+ default: '["mvn -B verify"]'
26
+ working-directory:
27
+ description: Directory holding the build file
28
+ type: string
29
+ default: .
30
+
31
+ permissions:
32
+ contents: read
33
+
34
+ jobs:
35
+ java:
36
+ name: java ${{ matrix.java }} (${{ matrix.os }})
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ os: ${{ fromJSON(inputs.os) }}
41
+ java: ${{ fromJSON(inputs.java-versions) }}
42
+ runs-on: ${{ matrix.os }}
43
+ permissions:
44
+ contents: read
45
+ defaults:
46
+ run:
47
+ shell: bash
48
+ working-directory: ${{ inputs.working-directory }}
49
+ steps:
50
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
51
+ with:
52
+ persist-credentials: false
53
+ - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
54
+ with:
55
+ distribution: temurin
56
+ java-version: ${{ matrix.java }}
57
+ cache: ${{ inputs.build-tool == 'maven' && 'maven' || '' }}
58
+ - if: inputs.build-tool == 'gradle'
59
+ uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
60
+ with:
61
+ gradle-version: ${{ inputs.gradle-version != '' && inputs.gradle-version || 'wrapper' }}
62
+ - name: Run checks
63
+ env:
64
+ COMMANDS: ${{ inputs.commands }}
65
+ run: |
66
+ node -e 'for (const c of JSON.parse(process.env.COMMANDS)) console.log(c)' | while IFS= read -r command; do
67
+ echo "::group::$command"
68
+ bash -c "$command" </dev/null
69
+ echo "::endgroup::"
70
+ done
@@ -0,0 +1,85 @@
1
+ name: stack-node
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ node-versions:
7
+ description: JSON list of Node.js versions
8
+ type: string
9
+ default: '["22","24"]'
10
+ os:
11
+ description: JSON list of runner labels
12
+ type: string
13
+ default: '["ubuntu-latest"]'
14
+ package-manager:
15
+ description: npm, pnpm or yarn
16
+ type: string
17
+ default: npm
18
+ install-command:
19
+ description: Command that installs dependencies
20
+ type: string
21
+ default: npm ci
22
+ cache:
23
+ description: setup-node cache, "npm" or empty for none
24
+ type: string
25
+ default: npm
26
+ scripts:
27
+ description: JSON list of package scripts to run in order
28
+ type: string
29
+ default: '["test"]'
30
+ test-command:
31
+ description: Extra command run after the scripts
32
+ type: string
33
+ default: ""
34
+ working-directory:
35
+ description: Directory holding package.json
36
+ type: string
37
+ default: .
38
+
39
+ permissions:
40
+ contents: read
41
+
42
+ jobs:
43
+ node:
44
+ name: node ${{ matrix.node }} (${{ matrix.os }})
45
+ strategy:
46
+ fail-fast: false
47
+ matrix:
48
+ os: ${{ fromJSON(inputs.os) }}
49
+ node: ${{ fromJSON(inputs.node-versions) }}
50
+ runs-on: ${{ matrix.os }}
51
+ permissions:
52
+ contents: read
53
+ defaults:
54
+ run:
55
+ shell: bash
56
+ working-directory: ${{ inputs.working-directory }}
57
+ env:
58
+ COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
59
+ steps:
60
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
61
+ with:
62
+ persist-credentials: false
63
+ - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
64
+ with:
65
+ node-version: ${{ matrix.node }}
66
+ cache: ${{ inputs.cache }}
67
+ cache-dependency-path: ${{ inputs.cache != '' && format('{0}/package-lock.json', inputs.working-directory) || '' }}
68
+ - name: Enable corepack
69
+ if: inputs.package-manager != 'npm'
70
+ run: corepack enable
71
+ - name: Install dependencies
72
+ run: ${{ inputs.install-command }}
73
+ - name: Run scripts
74
+ env:
75
+ PM: ${{ inputs.package-manager }}
76
+ SCRIPTS: ${{ inputs.scripts }}
77
+ run: |
78
+ node -e 'for (const s of JSON.parse(process.env.SCRIPTS)) console.log(s)' | while IFS= read -r script; do
79
+ echo "::group::$PM run $script"
80
+ "$PM" run "$script" </dev/null
81
+ echo "::endgroup::"
82
+ done
83
+ - name: Run the test command
84
+ if: inputs.test-command != ''
85
+ run: ${{ inputs.test-command }}
@@ -0,0 +1,66 @@
1
+ name: stack-php
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ php-versions:
7
+ description: JSON list of PHP versions
8
+ type: string
9
+ default: '["8.3","8.4"]'
10
+ os:
11
+ description: JSON list of runner labels
12
+ type: string
13
+ default: '["ubuntu-latest"]'
14
+ install-command:
15
+ description: Command that installs dependencies
16
+ type: string
17
+ default: composer install --no-interaction --no-progress
18
+ commands:
19
+ description: JSON list of shell commands run in order
20
+ type: string
21
+ default: '["composer validate --no-check-publish"]'
22
+ working-directory:
23
+ description: Directory holding composer.json
24
+ type: string
25
+ default: .
26
+
27
+ permissions:
28
+ contents: read
29
+
30
+ jobs:
31
+ php:
32
+ name: php ${{ matrix.php }} (${{ matrix.os }})
33
+ strategy:
34
+ fail-fast: false
35
+ matrix:
36
+ os: ${{ fromJSON(inputs.os) }}
37
+ php: ${{ fromJSON(inputs.php-versions) }}
38
+ runs-on: ${{ matrix.os }}
39
+ permissions:
40
+ contents: read
41
+ defaults:
42
+ run:
43
+ shell: bash
44
+ working-directory: ${{ inputs.working-directory }}
45
+ steps:
46
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
47
+ with:
48
+ persist-credentials: false
49
+ - uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
50
+ with:
51
+ php-version: ${{ matrix.php }}
52
+ tools: composer
53
+ coverage: none
54
+ - name: Install dependencies
55
+ env:
56
+ INSTALL: ${{ inputs.install-command }}
57
+ run: bash -c "$INSTALL"
58
+ - name: Run checks
59
+ env:
60
+ COMMANDS: ${{ inputs.commands }}
61
+ run: |
62
+ node -e 'for (const c of JSON.parse(process.env.COMMANDS)) console.log(c)' | while IFS= read -r command; do
63
+ echo "::group::$command"
64
+ bash -c "$command" </dev/null
65
+ echo "::endgroup::"
66
+ done
@@ -0,0 +1,70 @@
1
+ name: stack-python
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ python-versions:
7
+ description: JSON list of Python versions
8
+ type: string
9
+ default: '["3.11","3.12","3.13"]'
10
+ os:
11
+ description: JSON list of runner labels
12
+ type: string
13
+ default: '["ubuntu-latest"]'
14
+ manager:
15
+ description: pip or uv
16
+ type: string
17
+ default: pip
18
+ install-command:
19
+ description: Command that installs the project and its check tools
20
+ type: string
21
+ default: python -m pip install ruff
22
+ commands:
23
+ description: JSON list of shell commands run in order
24
+ type: string
25
+ default: '["ruff format --check .","ruff check ."]'
26
+ working-directory:
27
+ description: Directory holding the project
28
+ type: string
29
+ default: .
30
+
31
+ permissions:
32
+ contents: read
33
+
34
+ jobs:
35
+ python:
36
+ name: python ${{ matrix.python }} (${{ matrix.os }})
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ os: ${{ fromJSON(inputs.os) }}
41
+ python: ${{ fromJSON(inputs.python-versions) }}
42
+ runs-on: ${{ matrix.os }}
43
+ permissions:
44
+ contents: read
45
+ defaults:
46
+ run:
47
+ shell: bash
48
+ working-directory: ${{ inputs.working-directory }}
49
+ env:
50
+ UV_PYTHON: ${{ matrix.python }}
51
+ steps:
52
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
53
+ with:
54
+ persist-credentials: false
55
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
56
+ with:
57
+ python-version: ${{ matrix.python }}
58
+ - if: inputs.manager == 'uv'
59
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
60
+ - name: Install dependencies
61
+ run: ${{ inputs.install-command }}
62
+ - name: Run checks
63
+ env:
64
+ COMMANDS: ${{ inputs.commands }}
65
+ run: |
66
+ node -e 'for (const c of JSON.parse(process.env.COMMANDS)) console.log(c)' | while IFS= read -r command; do
67
+ echo "::group::$command"
68
+ bash -c "$command" </dev/null
69
+ echo "::endgroup::"
70
+ done