-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (35 loc) · 1.31 KB
/
build_test.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
name: Build&Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest #, macos-latest, windows-latest
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: 8
- name: build
uses: eskatos/gradle-command-action@v1
with:
arguments: build
- name: test
uses: eskatos/gradle-command-action@v1
with:
arguments: test
- uses: eskatos/gradle-command-action@v1
with:
arguments: jacocoTestReport
- name: upload codecov report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: download codacy-coverage-reporter
run: curl -Ls -o codacy-coverage-reporter "$(curl -Ls https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r '.assets | map({name, browser_download_url} | select(.name | contains("codacy-coverage-reporter-linux"))) | .[0].browser_download_url')"
- name: upload codacy report
run: chmod +x codacy-coverage-reporter && ./codacy-coverage-reporter report -l Kotlin -r build/reports/jacoco/test/jacocoTestReport.xml
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}