Skip to content

Commit a9a986a

Browse files
committed
Add sanity check flow
1 parent 5b98840 commit a9a986a

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/sanity-check.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Library Sanity Check
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
library_version:
7+
description: 'Library version (e.g. 5.21.0)'
8+
required: true
9+
type: string
10+
default: '5.21.0'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-22.04
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Checkout tls-gen
19+
uses: actions/checkout@v4
20+
with:
21+
repository: rabbitmq/tls-gen
22+
path: './tls-gen'
23+
- name: Set up JDK
24+
uses: actions/setup-java@v4
25+
with:
26+
distribution: 'zulu'
27+
java-version: '21'
28+
cache: 'maven'
29+
- uses: actions/cache@v4
30+
with:
31+
path: /root/.jbang
32+
key: $-jbang-$
33+
restore-keys: |
34+
$-jbang-
35+
- name: Start broker
36+
run: ci/start-broker.sh
37+
- name: Sanity Check
38+
uses: jbangdev/[email protected]
39+
with:
40+
script: src/test/java/SanityCheck.java
41+
env:
42+
RABBITMQ_LIBRARY_VERSION: ${{ inputs.library_version }}
43+
- name: Stop broker
44+
run: docker stop rabbitmq && docker rm rabbitmq

src/test/java/SanityCheck.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22
//REPOS mavencentral,ossrh-staging=https://oss.sonatype.org/content/groups/staging/,rabbitmq-packagecloud-milestones=https://packagecloud.io/rabbitmq/maven-milestones/maven2
3-
//DEPS com.rabbitmq:stream-client:${version}
3+
//DEPS com.rabbitmq:stream-client:${env.RABBITMQ_LIBRARY_VERSION}
44
//DEPS org.slf4j:slf4j-simple:1.7.36
55

66
import com.rabbitmq.stream.Environment;

0 commit comments

Comments
 (0)