Skip to content
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
Expand Down Expand Up @@ -117,10 +117,10 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
Expand All @@ -144,7 +144,7 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Build and verify images
run: ./scripts/test/test-docker-images.sh
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: go

- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
28 changes: 14 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
goarch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag || github.ref }}

- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
Expand Down Expand Up @@ -71,12 +71,12 @@ jobs:
goarch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag || github.ref }}

- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
Expand Down Expand Up @@ -114,12 +114,12 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag || github.ref }}

- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
Expand Down Expand Up @@ -200,18 +200,18 @@ jobs:
goarch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag || github.ref }}

- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true

- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'

Expand Down Expand Up @@ -331,7 +331,7 @@ jobs:
goarch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag || github.ref }}

Expand Down Expand Up @@ -400,7 +400,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag || github.ref }}

Expand Down Expand Up @@ -511,7 +511,7 @@ jobs:
tag_prefix: browser-
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag || github.ref }}

Expand Down Expand Up @@ -747,7 +747,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag || github.ref }}

Expand Down Expand Up @@ -801,7 +801,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag || github.ref }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
relevant: ${{ steps.filter.outputs.relevant }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand Down Expand Up @@ -77,16 +77,16 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true

- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'

Expand Down
30 changes: 30 additions & 0 deletions scripts/test/ci_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,36 @@ func readWorkflow(t *testing.T, name string) string {
return strings.ReplaceAll(string(data), "\r\n", "\n")
}

func TestWorkflowsUseCurrentActionMajors(t *testing.T) {
expected := map[string]string{
"uses: actions/checkout@": "uses: actions/checkout@v5",
"uses: actions/setup-go@": "uses: actions/setup-go@v6",
"uses: actions/setup-dotnet@": "uses: actions/setup-dotnet@v5",
"uses: github/codeql-action/init@": "uses: github/codeql-action/init@v4",
"uses: github/codeql-action/autobuild@": "uses: github/codeql-action/autobuild@v4",
"uses: github/codeql-action/analyze@": "uses: github/codeql-action/analyze@v4",
}
foundManagedAction := false
for _, name := range []string{"ci.yml", "codeql.yml", "release.yml", "windows-installer.yml"} {
workflow := readWorkflow(t, name)
for _, line := range strings.Split(workflow, "\n") {
trimmed := strings.TrimSpace(line)
for prefix, want := range expected {
if !strings.HasPrefix(trimmed, prefix) {
continue
}
foundManagedAction = true
if trimmed != want {
t.Fatalf("workflow %s must use %q, got %q", name, want, trimmed)
}
}
}
}
if !foundManagedAction {
t.Fatal("expected workflows to use managed GitHub Actions")
}
}

func TestCIWorkflowUsesFreshBoundedGoTests(t *testing.T) {
workflow := readWorkflow(t, "ci.yml")
for _, want := range []string{
Expand Down