Skip to content

Commit f9eabb5

Browse files
authored
use Mise (#1319)
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent c57106d commit f9eabb5

File tree

8 files changed

+39
-51
lines changed

8 files changed

+39
-51
lines changed

Diff for: .github/workflows/acceptance-tests.yml

+5-23
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,14 @@ jobs:
1010
acceptance-tests:
1111
runs-on: ubuntu-24.04
1212
steps:
13-
- uses: actions/checkout@v4
14-
- name: Check out oats
13+
- name: Check out
1514
uses: actions/checkout@v4
16-
with:
17-
repository: grafana/oats
18-
ref: v0.1.0
19-
path: oats
20-
- name: Set up JDK
21-
uses: actions/setup-java@v4
22-
with:
23-
java-version: 17
24-
distribution: temurin
25-
cache: 'maven'
26-
- name: Set up Go
27-
uses: actions/setup-go@v5
28-
with:
29-
go-version: '1.23'
30-
cache-dependency-path: oats/go.sum
31-
- name: Run the Maven verify phase
32-
run: |
33-
./mvnw clean install -DskipTests
15+
- uses: jdx/mise-action@v2
3416
- name: Run acceptance tests
35-
run: ./scripts/run-acceptance-tests.sh
17+
run: mise run acceptance-test
3618
- name: upload log file
3719
uses: actions/upload-artifact@v4
3820
if: failure()
3921
with:
40-
name: OATS logs
41-
path: oats/yaml/build/**/*.log
22+
name: OATs logs
23+
path: build/**/*.log

Diff for: .github/workflows/native-tests.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@ jobs:
1010
native-tests:
1111
runs-on: ubuntu-24.04
1212
steps:
13-
- uses: actions/checkout@v4
14-
- name: Set up JDK
15-
uses: actions/setup-java@v4
16-
with:
17-
java-version: '21'
18-
distribution: graalvm
19-
cache: 'maven'
20-
- name: Run the Maven verify phase
21-
run: ./scripts/run-native-tests.sh
13+
- name: Check out
14+
uses: actions/checkout@v4
15+
- uses: jdx/mise-action@v2
16+
- name: Run native tests
17+
run: mise run native-test

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*.iml
1010

1111
target/
12+
build/
1213
simpleclient_pushgateway/mockserver.log
1314
simpleclient_pushgateway/mockserver_request.log
1415
nb-configuration.xml

Diff for: mise.lock

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[tools."go:github.com/grafana/oats"]
2+
version = "0.2.0"
3+
backend = "go:github.com/grafana/oats"
4+
15
[tools.java]
26
version = "temurin-17.0.13+11"
37
backend = "core:java"

Diff for: mise.toml

+23-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
PROTO_GENERATION = "true"
33

44
[tools]
5+
"go:github.com/grafana/oats" = "0.2.0"
56
java = "temurin-17.0.13+11"
67
protoc = "latest"
78

89
[tasks.ci]
910
description = "CI Build"
1011
run = [
11-
"./mvnw clean install",
12-
# just to check if javadoc can be generated
13-
"./mvnw javadoc:javadoc -P javadoc"
12+
"./mvnw clean install",
13+
# just to check if javadoc can be generated
14+
"./mvnw javadoc:javadoc -P javadoc"
1415
]
1516
env = { REQUIRE_PROTO_UP_TO_DATE = "true" }
1617

@@ -26,3 +27,22 @@ run = "./mvnw test -DskipTests=true -Dspotless.check.skip=true -Dcoverage.skip=t
2627
description = "run all tests"
2728
run = "./mvnw verify"
2829

30+
[tasks.build]
31+
description = "build all modules wihthout tests"
32+
run = "./mvnw clean install -DskipTests"
33+
34+
[tasks.acceptance-test]
35+
description = "Run OATs acceptance tests"
36+
depends = "build"
37+
run = "oats -timeout 5m examples/"
38+
39+
[tasks.native-test]
40+
depends = "build"
41+
tools.java = "graalvm-22.3.3+java17"
42+
run = "../../mvnw test -PnativeTest"
43+
dir = "integration-tests/it-spring-boot-smoke-test"
44+
45+
[settings]
46+
# to get lock file support and for go backend
47+
experimental = true
48+

Diff for: prometheus-metrics-exposition-formats/generate-protobuf.sh

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ if [[ $GENERATED_WITH != "$PROTOBUF_VERSION" ]]; then
4141
exit 1
4242
fi
4343

44+
git checkout -- ../mise.lock # see https://github.com/jdx/mise/discussions/4782
4445
STATUS=$(git status --porcelain)
4546
if [[ ${REQUIRE_PROTO_UP_TO_DATE:-false} == "true" && -n "$STATUS" ]]; then
4647
echo "Please use https://mise.jdx.dev/ - this will use the version specified in mise.toml"

Diff for: scripts/run-acceptance-tests.sh

-9
This file was deleted.

Diff for: scripts/run-native-tests.sh

-7
This file was deleted.

0 commit comments

Comments
 (0)