Skip to content

Commit 532d015

Browse files
committed
github: separate cockroach-go workflow, add issue filing
1 parent 94506e9 commit 532d015

File tree

2 files changed

+96
-30
lines changed

2 files changed

+96
-30
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Nightly cockroach-go tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
sha:
7+
description: 'SHA to run against'
8+
required: false
9+
type: string
10+
file_issue_branch:
11+
description: 'Branch used in filed issues; if unset, no issues are filed'
12+
required: false
13+
type: string
14+
bootstrap_go_version:
15+
description: 'Bootstrap Go version'
16+
required: false
17+
default: '1.25'
18+
type: string
19+
go_branch:
20+
description: 'CockroachDB Go fork branch'
21+
required: true
22+
type: string
23+
workflow_dispatch:
24+
inputs:
25+
sha:
26+
description: 'SHA to run against'
27+
required: false
28+
type: string
29+
file_issue_branch:
30+
description: 'Branch used in filed issues; if unset, no issues are filed'
31+
required: false
32+
type: string
33+
bootstrap_go_version:
34+
description: 'Bootstrap Go version'
35+
required: false
36+
default: '1.25'
37+
type: string
38+
go_branch:
39+
description: 'CockroachDB Go fork branch'
40+
required: true
41+
type: string
42+
43+
jobs:
44+
linux-cockroach-go:
45+
name: linux-cockroach-go
46+
runs-on: ubuntu-latest
47+
env:
48+
GO_BRANCH: ${{ inputs.go_branch }}
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
with:
53+
ref: ${{ inputs.sha || github.sha }}
54+
55+
# Step 1: Fetch the branch tip SHA for cache key
56+
- name: Get cockroachdb/go commit hash
57+
id: go-sha
58+
run: |
59+
SHA=$(git ls-remote https://github.com/cockroachdb/go.git refs/heads/$GO_BRANCH | cut -f1)
60+
echo "GO_SHA=$SHA" >> $GITHUB_ENV
61+
62+
# Step 2: Restore cache (per branch + commit SHA)
63+
- name: Cache custom Go toolchain
64+
uses: actions/cache@v4
65+
with:
66+
path: ~/.cache/cockroachdb-go/${{ env.GO_SHA }}
67+
key: cockroachdb-${{ env.GO_SHA }}
68+
69+
# Step 3: Install bootstrap Go (needed to build fork)
70+
- name: Install bootstrap Go
71+
uses: actions/setup-go@v5
72+
with:
73+
go-version: ${{ inputs.bootstrap_go_version }}
74+
75+
# Step 4: Run tests with custom Go
76+
- run: ./scripts/run-tests-with-custom-go.sh -tags invariants ./...
77+
78+
- name: Post issue on failure
79+
if: failure() && inputs.file_issue_branch != ''
80+
id: create-or-update-unique-issue
81+
uses: ./.github/actions/post-issue
82+
with:
83+
title: "${{ inputs.file_issue_branch }}: nightly ${{ github.job }} failed"
84+
body: "The nightly ${{ github.job }} test run failed on ${{ inputs.sha }}. Please review the run [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
85+
labels: "C-test-failure"

.github/workflows/nightlies.yaml

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -50,33 +50,14 @@ jobs:
5050
file_issue_branch: 'master'
5151
go_version: ${{ matrix.go }}
5252

53-
linux-cockroach-go:
54-
runs-on: ubuntu-latest
55-
env:
56-
GO_BRANCH: cockroach-go1.25.3
57-
58-
steps:
59-
- uses: actions/checkout@v4
60-
61-
# Step 1: Fetch the branch tip SHA for cache key
62-
- name: Get cockroachdb/go commit hash
63-
id: go-sha
64-
run: |
65-
SHA=$(git ls-remote https://github.com/cockroachdb/go.git refs/heads/$GO_BRANCH | cut -f1)
66-
echo "GO_SHA=$SHA" >> $GITHUB_ENV
67-
68-
# Step 2: Restore cache (per branch + commit SHA)
69-
- name: Cache custom Go toolchain
70-
uses: actions/cache@v4
71-
with:
72-
path: ~/.cache/cockroachdb-go/${{ env.GO_SHA }}
73-
key: cockroachdb-${{ env.GO_SHA }}
74-
75-
# Step 3: Install bootstrap Go (needed to build fork)
76-
- name: Install bootstrap Go
77-
uses: actions/setup-go@v5
78-
with:
79-
go-version: "1.25.x"
80-
81-
# Step 4: Run tests with custom Go
82-
- run: ./scripts/run-tests-with-custom-go.sh -tags invariants ./...
53+
cockroach-go:
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
go: [ '1.25' ]
58+
uses: ./.github/workflows/cockroach-go.yaml
59+
with:
60+
sha: ${{ github.sha }}
61+
file_issue_branch: 'master'
62+
bootstrap_go_version: '1.25'
63+
go_branch: 'cockroach-go1.25.3'

0 commit comments

Comments
 (0)