-
Notifications
You must be signed in to change notification settings - Fork 83
67 lines (52 loc) · 1.94 KB
/
Copy pathci-java.yml
File metadata and controls
67 lines (52 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: "java / test e2e"
on:
workflow_call:
permissions:
contents: read
jobs:
build:
name: "Build & Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: ./.github/actions/setup
- uses: ./.github/actions/setup-java
- name: Install dependencies
run: pnpm install
# Build the emitter (build:generator builds emitter.jar from the core
# generator after applying core.patch; build:emitter copies sources + tsc)
# together with the peer packages it compiles against.
- name: Build
run: pnpm turbo run --filter "@azure-tools/typespec-java..." build
- name: Test (emitter unit tests)
run: pnpm run test
working-directory: packages/typespec-java
e2e:
name: "Regen & Spector Tests"
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: ./.github/actions/setup
- uses: ./.github/actions/setup-java
- name: Install dependencies
run: pnpm install
# The emitter compiles against these peer packages; `pnpm run regenerate`
# (Generate.ps1) runs `pnpm build` for the emitter, which needs them already
# built.
- name: Build dependencies
run: pnpm turbo run --filter "@azure-tools/typespec-java^..." build
# The e2e tests live in the same @azure-tools/typespec-java package (Maven+tsp
# assets under emitter-tests/). `pnpm run regenerate` builds the emitter and
# regenerates the SDK from the spector specs into the gitignored src/main/java;
# `pnpm run test:java:e2e` runs the JUnit tests against the Spector mock server.
- name: Regenerate
run: pnpm run regenerate
working-directory: packages/typespec-java
- name: Spector tests
run: pnpm run test:java:e2e
working-directory: packages/typespec-java