-
Notifications
You must be signed in to change notification settings - Fork 35
49 lines (39 loc) · 1.42 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
name: Build
on: [ push, pull_request, workflow_dispatch ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Node Cache"
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-cache-node-${{ hashFiles('**/package.json') }}
- name: "Node Modules Cache"
uses: actions/cache@v3
with:
path: $GITHUB_WORKSPACE/repo/node_modules
key: ${{ runner.os }}-cache-node_modules-${{ hashFiles('**/package.json') }}
- name: "Setup Node"
uses: actions/setup-node@v3
with:
node-version: 16
- name: "Setup Java"
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
cache: 'maven'
- name: "Maven and Node Tests"
run: mvn clean test jacoco:report coveralls:report -DdryRun=true -DtestClient
- name: "Combine Coverage"
run: |
cat coverage/lcov.info | node node_modules/coveralls/bin/coveralls.js -s > coverage/coveralls.json
jq 'reduce inputs as $i (.; .source_files += $i.source_files)' target/coveralls.json coverage/coveralls.json > coveralls.json
- name: "Send to Coveralls"
uses: MikeEdgar/github-action@raw_coverage_file
with:
github-token: ${{ secrets.github_token }}
path-to-file: './coveralls.json'
coverage-format: raw