Skip to content

Commit 3f2eab7

Browse files
authored
Add advisory semver checks to CI (#5645)
Also allow for custom pre-release drafts. --------- Signed-off-by: Nicholas Gates <[email protected]>
1 parent 0fd3b0c commit 3f2eab7

File tree

8 files changed

+60
-12
lines changed

8 files changed

+60
-12
lines changed

.github/release-drafter.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name-template: "🌪 $RESOLVED_VERSION"
1+
name-template: "$RESOLVED_VERSION"
22
tag-template: "$RESOLVED_VERSION"
33
categories:
44
- title: "⚠️ Breaks"
@@ -36,6 +36,9 @@ version-resolver:
3636
- "wire-break"
3737
default: patch
3838

39+
exclude-labels:
40+
- "skip-changelog"
41+
3942
template: |
4043
## Changes
4144

.github/workflows/bench-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
types: [labeled, synchronize]
88
branches: ["develop"]
9-
workflow_dispatch: {}
9+
workflow_dispatch: { }
1010

1111
permissions:
1212
actions: write # for removing labels

.github/workflows/ci.yml

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ concurrency:
77
on:
88
push:
99
branches: ["develop"]
10-
pull_request: {}
11-
workflow_dispatch: {}
10+
pull_request: { }
11+
workflow_dispatch: { }
1212

1313
permissions:
1414
actions: read
@@ -38,8 +38,7 @@ jobs:
3838
# Lint the workflows and yamllint's configuration file.
3939
yamllint \
4040
--strict \
41-
-c yamllint-config.yaml \
42-
yamllint-config.yaml \
41+
-c .yamllint.yaml \
4342
.github/
4443
4544
python-lint:
@@ -311,6 +310,43 @@ jobs:
311310
# https://spiraldb.slack.com/archives/C07BV3GKAJ2/p1732736281946729
312311
cargo hack clippy --no-default-features -- -D warnings
313312
313+
rust-semver:
314+
name: "Rust (semver checks)"
315+
timeout-minutes: 120
316+
if: github.ref != 'refs/heads/develop'
317+
runs-on:
318+
- runs-on=${{ github.run_id }}
319+
- family=m7i+m7i-flex+m7a
320+
- cpu=16
321+
- image=ubuntu24-full-x64
322+
- extras=s3-cache
323+
- tag=rust-semver
324+
steps:
325+
- uses: runs-on/action@v2
326+
with:
327+
sccache: s3
328+
- uses: actions/checkout@v6
329+
with:
330+
fetch-depth: 0
331+
fetch-tags: true
332+
- uses: ./.github/actions/setup-rust
333+
with:
334+
repo-token: ${{ secrets.GITHUB_TOKEN }}
335+
336+
# We have to set the correct Cargo.toml versions so semver checks uses the previous release.
337+
- name: Latest Tag
338+
id: latest-tag
339+
run: |
340+
LATEST_TAG=$(git describe --tags --abbrev=0)
341+
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
342+
- name: Cargo Set Version
343+
run: |
344+
cargo install cargo-edit
345+
cargo set-version --workspace ${{ steps.latest-tag.outputs.tag }}
346+
347+
- name: Check semver
348+
uses: obi1kenobi/cargo-semver-checks-action@v2
349+
314350
rust-coverage:
315351
name: "Rust tests (coverage)"
316352
timeout-minutes: 120

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Vortex Docs
33
on:
44
push:
55
branches: [develop]
6-
workflow_dispatch: {}
6+
workflow_dispatch: { }
77

88
permissions:
99
contents: read

.github/workflows/labels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
"performance"
3535
"break"
3636
"wire-break"
37+
"skip-changelog"
3738
)
3839
REQUIRED_LABELS_JSON=$(jq -n '$ARGS.positional' --args "${REQUIRED_LABELS[@]}")
3940
echo "Required Labels: $REQUIRED_LABELS_JSON"

.github/workflows/release-drafter.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ on:
33
push:
44
branches:
55
- develop
6+
workflow_dispatch:
7+
# Permits a custom run to create a pre-release
8+
inputs:
9+
prerelease-identifier:
10+
description: "RC identifier (e.g., rc, beta, alpha)"
11+
type: string
12+
default: "rc"
613

714
permissions:
815
contents: read
@@ -14,9 +21,10 @@ jobs:
1421
contents: write
1522
runs-on: ubuntu-latest
1623
steps:
17-
# Drafts your next Release notes as Pull Requests are merged into "develop"
1824
- uses: release-drafter/[email protected]
1925
env:
2026
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2127
with:
22-
commitish: "develop"
28+
commitish: ${{ github.ref_name }}
29+
prerelease: ${{ github.event_name == 'workflow_dispatch' }}
30+
prerelease-identifier: ${{ inputs.prerelease-identifier || '' }}

.github/workflows/sql-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
types: [labeled, synchronize]
88
branches: ["develop"]
9-
workflow_dispatch: {}
9+
workflow_dispatch: { }
1010

1111
permissions:
1212
actions: write # for removing labels
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ rules:
1414
forbid: false
1515
min-spaces-inside: 1
1616
max-spaces-inside: 1
17-
min-spaces-inside-empty: 0
18-
max-spaces-inside-empty: 0
17+
min-spaces-inside-empty: 1
18+
max-spaces-inside-empty: 1
1919
brackets:
2020
forbid: false
2121
min-spaces-inside: 0

0 commit comments

Comments
 (0)