forked from kobylynskyi/graphql-java-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (66 loc) · 1.99 KB
/
Copy pathgithub.yml
File metadata and controls
87 lines (66 loc) · 1.99 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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
jdk-version: [1.8]
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ 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: Build library
run: ./gradlew build publishToMavenLocal
- name: Build gradle plugin
run: ./gradlew -p plugins/gradle/graphql-java-codegen-gradle-plugin build publishToMavenLocal
- name: Build maven plugin
working-directory: plugins/maven/graphql-java-codegen-maven-plugin
run: mvn install
- name: Build gradle example-server
run: ./gradlew -p plugins/gradle/example-server test
- name: Build gradle example-client
run: ./gradlew -p plugins/gradle/example-client test
- 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
code-coverage:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- 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: Generate code coverage report
run: ./gradlew codeCoverageReport
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true