forked from kobylynskyi/graphql-java-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (102 loc) · 3.22 KB
/
Copy pathgithub.yml
File metadata and controls
117 lines (102 loc) · 3.22 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
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
113
114
115
116
117
name: Build
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
jdk-version: [1.8]
steps:
- uses: actions/checkout@v2
- name: Setup Java ${{ matrix.jdk-version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk-version }}
- name: Gradle cache
uses: actions/cache@v1
with:
path: ~/.gradle
key: gradle
- name: Maven cache
uses: actions/cache@v1
with:
path: ~/.m2
key: m2
- name: Loading ivy cache
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/*.sbt') }}
restore-keys: |
${{ runner.os }}-ivy-
- name: Build library
run: ./gradlew build publishToMavenLocal publishAllPublicationsToIvyRepository --warning-mode all
- name: Build gradle plugin
run: ./gradlew -p plugins/gradle/graphql-java-codegen-gradle-plugin build publishToMavenLocal --warning-mode all
- name: Build maven plugin
working-directory: plugins/maven/graphql-java-codegen-maven-plugin
run: mvn install
- name: Build sbt plugin
working-directory: plugins/sbt/graphql-java-codegen-sbt-plugin
run: sbt compile publishLocal --debug
- name: Build sbt test
working-directory: plugins/sbt/graphql-java-codegen-sbt-plugin
run: sbt scripted
- name: Build gradle example-server --warning-mode all
run: ./gradlew -p plugins/gradle/example-server test --warning-mode all
- name: Build gradle example-client
run: ./gradlew -p plugins/gradle/example-client test --warning-mode all
- name: Build maven example-server
working-directory: plugins/maven/example-server
run: mvn package
- name: Build maven example-client
working-directory: plugins/maven/example-client
run: mvn package
# donot use unittest, but please execute unittest before committing
#
# sonar:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
#
# - name: Setup Java
# uses: actions/setup-java@v1
# with:
# java-version: 11
#
# - name: Gradle cache
# uses: actions/cache@v1
# with:
# path: ~/.gradle
# key: gradle
#
# - name: Maven cache
# uses: actions/cache@v1
# with:
# path: ~/.m2
# key: m2
#
# - name: Loading ivy cache
# uses: actions/cache@v1
# with:
# path: ~/.ivy2/cache
# key: ${{ runner.os }}-ivy-${{ hashFiles('**/*.sbt') }}
# restore-keys: |
# ${{ runner.os }}-ivy-
#
# - name: Generate code coverage report
# run: ./gradlew codeCoverageReport --stacktrace
#
# - name: Generate and publish Sonar report
# run: ./gradlew sonarqube -Dsonar.projectKey=kobylynskyi_graphql-java-codegen -Dsonar.organization=kobylynskyi -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_LOGIN }} --stacktrace
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}