forked from partiql/partiql-lang-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (61 loc) · 1.94 KB
/
build.yml
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
name: "Build and Report Generation"
on:
push:
pull_request:
branches:
# Branches from forks have the form 'user:branch-name' so we only run
# this job on pull_request events for branches that look like fork
# branches. Without this we would end up running this job twice for non
# forked PRs, once for the push and then once for opening the PR.
# Taken from https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/10
- '**:**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 9, 10, 11]
steps:
- uses: actions/checkout@v2
- name: Use Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build and test
run: ./gradlew build
report-generation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Java 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Generate test coverage report
run: ./gradlew build jacocoTestReport
# Upload coverage for CLI, LANG, PTS, TEST_SCRIPT, and EXAMPLES
- name: Upload CLI coverage
uses: codecov/codecov-action@v1
with:
directory: cli/build/reports
flags: CLI
- name: Upload LANG coverage
uses: codecov/codecov-action@v1
with:
directory: lang/build/reports
flags: LANG
- name: Upload PTS coverage
uses: codecov/codecov-action@v1
with:
directory: pts/build/reports
flags: PTS
- name: Upload TEST_SCRIPT coverage
uses: codecov/codecov-action@v1
with:
directory: testscript/build/reports
flags: TEST_SCRIPT
- name: Upload EXAMPLES coverage
uses: codecov/codecov-action@v1
with:
directory: examples/build/reports
flags: EXAMPLES