Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update GitHub Actions #4193

Merged
merged 4 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/actions/free-disk-space/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: free-disk-space
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add this? Github runners have 14 GB of disk space and cache entry for release jobs is about 3 GB.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds were running out of space, e.g.https://github.com/twpayne/chezmoi/actions/runs/12700388677.

description: Frees disk space by deleting unused files
runs:
using: composite
steps:
- name: remove-android
shell: bash
run: sudo rm -rf /usr/local/lib/android
- name: remove-dotnet
shell: bash
run: sudo rm -rf /usr/share/dotnet
2 changes: 1 addition & 1 deletion .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
key: ${{ inputs.cache-prefix }}-${{ runner.os }}-${{ runner.arch }}-go-${{ inputs.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ inputs.cache-prefix }}-${{ runner.os }}-${{ runner.arch }}-go-${{ inputs.go-version }}-
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
cache: false
go-version: ${{ inputs.go-version }}
22 changes: 14 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
upload-cache: false
- uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
- uses: github/codeql-action/init@3407610120cd5656b6fc71991415cb50748b9489
with:
languages: go
- uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
- uses: github/codeql-action/analyze@3407610120cd5656b6fc71991415cb50748b9489
misspell:
runs-on: ubuntu-22.04
permissions:
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
strategy:
fail-fast: false
matrix:
test-index: [0, 1, 2]
test-index: [0, 1, 2, 3]
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.code == 'true'
runs-on: macos-15
Expand Down Expand Up @@ -169,9 +169,11 @@ jobs:
go test ./... -short -race
go test ./internal/cmd -run=TestScript -filter='^[0-9a-dA-D]' -race
elif [ "${{ matrix.test-index }}" = "1" ]; then
go test ./internal/cmd -run=TestScript -filter='^[e-iE-I]' -race
go test ./internal/cmd -run=TestScript -filter='^[e-hE-H]' -race
elif [ "${{ matrix.test-index }}" = "2" ]; then
go test ./internal/cmd -run=TestScript -filter='^[i-qI-Q]' -race
else
go test ./internal/cmd -run=TestScript -filter='^[j-zJ-Z]' -race
go test ./internal/cmd -run=TestScript -filter='^[r-zR-Z]' -race
fi
test-oldstable-go:
needs: changes
Expand Down Expand Up @@ -216,6 +218,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- uses: ./.github/actions/free-disk-space
- uses: ./.github/actions/setup-go
with:
cache-prefix: release-go
Expand Down Expand Up @@ -352,7 +355,7 @@ jobs:
strategy:
fail-fast: false
matrix:
test-index: [0, 1, 2]
test-index: [0, 1, 2, 3]
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.code == 'true'
runs-on: windows-2022
Expand All @@ -377,9 +380,11 @@ jobs:
go test ./... -short -race
go test ./internal/cmd -run=TestScript -filter='^[0-9a-cA-C]' -race
} elseif (${{ matrix.test-index }} -eq 1) {
go test ./internal/cmd -run=TestScript -filter='^[d-lD-L]' -race
go test ./internal/cmd -run=TestScript -filter='^[d-fD-F]' -race
} elseif (${{ matrix.test-index }} -eq 2) {
go test ./internal/cmd -run=TestScript -filter='^[g-mG-M]' -race
} else {
go test ./internal/cmd -run=TestScript -filter='^[m-zM-Z]' -race
go test ./internal/cmd -run=TestScript -filter='^[n-zN-Z]' -race
}
check:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -485,6 +490,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- uses: ./.github/actions/free-disk-space
- uses: ./.github/actions/setup-go
with:
cache-prefix: release-go
Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ go 1.23.4

require (
filippo.io/age v1.2.1
github.com/1password/onepassword-sdk-go v0.1.5
github.com/1password/onepassword-sdk-go v0.1.6
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.3.0
github.com/Masterminds/sprig/v3 v3.3.0
github.com/Shopify/ejson v1.5.3
github.com/alecthomas/assert/v2 v2.11.0
github.com/aws/aws-sdk-go-v2 v1.32.7
github.com/aws/aws-sdk-go-v2/config v1.28.7
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.8
github.com/aws/aws-sdk-go-v2 v1.32.8
github.com/aws/aws-sdk-go-v2/config v1.28.9
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.10
github.com/bmatcuk/doublestar/v4 v4.7.1
github.com/bradenhilton/mozillainstallhash v1.0.1
github.com/charmbracelet/bubbles v0.20.0
Expand Down Expand Up @@ -78,16 +78,16 @@ require (
github.com/alecthomas/chroma/v2 v2.15.0 // indirect
github.com/alecthomas/repr v0.4.0 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.48 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.50 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.23 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.27 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.27 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.8 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.9 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.8 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.5 // indirect
github.com/aws/smithy-go v1.22.1 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
Expand Down Expand Up @@ -138,7 +138,7 @@ require (
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
Expand All @@ -153,12 +153,12 @@ require (
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/skeema/knownhosts v1.3.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/afero v1.12.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/viper v1.19.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
Expand Down
Loading