-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (107 loc) · 2.82 KB
/
ci.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
style_check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: style_check_maven
- name: Check Format
run: ./mvnw editorconfig:check
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: build_maven
- name: Build
run: ./mvnw install -e
- name: Upload generated sources
uses: actions/upload-artifact@v4
with:
name: generated-sources
path: |
./it/java8/target/generated-sources
./it/java17/target/generated-sources
if-no-files-found: error
retention-days: 3
- name: Upload jars
uses: actions/upload-artifact@v4
with:
name: jars
path: |
~/.m2/repository/online/sharedtype
if-no-files-found: error
retention-days: 3
- name: Remove jars from cache
run: rm -rf ~/.m2/repository/online/sharedtype
jdk_compatibility_test:
needs: [build_and_test]
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- uses: actions/download-artifact@v4
with:
name: jars
path: ~/.m2/repository/online/sharedtype
# - name: Display downloaded artifact
# run: ls -lhR ~/.m2/repository/online/sharedtype
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: build_maven
- name: Test
run: ./mvnw verify -pl it/java8 -e
client_test:
needs: [build_and_test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/download-artifact@v4
with:
name: generated-sources
path: ./it/
# - name: Display downloaded artifact
# run: ls -lhR ./it/
- name: Test Typescript
working-directory: client-test/typescript
run: |
npm i
npm run test
# clean-artifact:
# needs: [ jdk_compatibility_test, client_test ]
# runs-on: ubuntu-latest
# if: always()
# steps:
# - uses: geekyeggo/delete-artifact@v5
# with:
# name: dist