Skip to content

Commit 228ec81

Browse files
Run Java tests on generated schemas in stefgen on Github
We have testcases in stefgen/generator/testdata which currently generate Go and Java code from schemas, but only run Go tests. We need to also run Java tests. The action sets up both Go and Java, builds stefgen using Go, generates Java code from schemas using stefgen, then runs Java tests. #114
1 parent 2589604 commit 228ec81

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

.github/workflows/java-schema-test.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@ name: Java Schema Generation and Test
22

33
on:
44
push:
5-
paths:
6-
- stefgen/generator/testdata/**
7-
- stefgen/**
8-
- java/**
5+
branches: [main]
6+
tags:
7+
- "v[0-9]+.[0-9]+.[0-9]+*"
98
pull_request:
10-
paths:
11-
- stefgen/generator/testdata/**
12-
- stefgen/**
13-
- java/**
149

1510
jobs:
1611
generate-and-test-java:

stefgen/templates/java/oneof.java.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class {{ .StructName }} {
5252
}
5353

5454
public int getValue() {
55-
return value;
55+
return value;a
5656
}
5757
}
5858

0 commit comments

Comments
 (0)