Skip to content

Commit 5ad8e52

Browse files
committed
Validate mono changesets in CI
See appsignal/mono#87 for context. Add a CI job that validates changesets using Mono. Split the existing "CI" job into specific jobs for each part of the flow.
1 parent ec16df1 commit 5ad8e52

2 files changed

Lines changed: 59 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,50 @@ concurrency:
1717
cancel-in-progress: "${{ !contains(github.ref, 'main')}}"
1818

1919
jobs:
20-
ci:
20+
validate-changesets:
21+
name: Validate changesets
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout project
25+
uses: actions/checkout@v4
26+
- name: Checkout Mono
27+
uses: actions/checkout@v4
28+
with:
29+
repository: appsignal/mono
30+
path: tmp/mono
31+
- name: Install Ruby
32+
uses: ruby/setup-ruby@v1
33+
with:
34+
ruby-version: '3.3'
35+
- name: Validate changesets
36+
run: tmp/mono/bin/mono changeset validate
37+
38+
build:
39+
name: "cargo build"
2140
runs-on: ubuntu-latest
2241
steps:
2342
- uses: actions/checkout@v4
24-
- run: rustup component add clippy rustfmt
2543
- run: cargo build --verbose
44+
45+
test:
46+
name: "cargo test"
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v4
2650
- run: cargo test --verbose
51+
52+
clippy:
53+
name: "Rust clippy"
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
- run: rustup component add clippy
2758
- run: cargo clippy --verbose --tests --all-targets --all-features -- -D warnings
59+
60+
formatter:
61+
name: "Rust formatter"
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
- run: rustup component add rustfmt
2866
- run: cargo fmt --check --verbose

.github/workflows/publish_release.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,27 @@ env:
88
PUBLISH_GIT_EMAIL: "support+build-sign@appsignal.com"
99

1010
jobs:
11+
validate-changesets:
12+
name: Validate changesets
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout project
16+
uses: actions/checkout@v4
17+
- name: Checkout Mono
18+
uses: actions/checkout@v4
19+
with:
20+
repository: appsignal/mono
21+
path: tmp/mono
22+
- name: Install Ruby
23+
uses: ruby/setup-ruby@v1
24+
with:
25+
ruby-version: '3.3'
26+
- name: Validate changesets
27+
run: tmp/mono/bin/mono changeset validate
28+
1129
build:
1230
name: "Build the release"
31+
needs: [validate-changesets]
1332
runs-on: ${{matrix.runner}}
1433
strategy:
1534
fail-fast: true

0 commit comments

Comments
 (0)