-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (64 loc) · 2.29 KB
/
feature.yml
File metadata and controls
64 lines (64 loc) · 2.29 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
name: Feature CI
on:
push:
branches:
- feature/*
env:
CI: true
GITHUB_BRANCH: ${{ github.ref }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_COMMIT: ${{ github.sha }}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
java: [ '17.0.1' ]
fail-fast: false
name: ${{ matrix.os }} JDK ${{ matrix.java }}
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Echo JAVA_HOME
run: echo $JAVA_HOME
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Verify Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Execute clean
run: ./gradlew --info --stacktrace clean
- name: Execute check
run: ./gradlew --info --stacktrace check
- name: Publish code coverage to codeclimate
if: matrix.os == 'ubuntu-latest'
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
JACOCO_SOURCE_PATH: "${{github.workspace}}/src/main/java"
with:
coverageLocations: ${{github.workspace}}/build/reports/jacoco/jacocoTestReport.xml:jacoco
- name: Publish code coverage to coveralls
if: matrix.os == 'ubuntu-latest'
env:
COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}}
run: ./gradlew --info --stacktrace coveralls
- name: Publish code coverage to codacy
if: matrix.os == 'ubuntu-latest'
env:
CODACY_PROJECT_TOKEN: ${{secrets.CODACY_PROJECT_TOKEN}}
CODACY_ORGANIZATION_PROVIDER: gh
CODACY_USERNAME: gregoranders
CODACY_PROJECT_NAME: "com.github.gregoranders.template"
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Java -r "${{github.workspace}}/build/reports/jacoco/jacocoTestReport.xml"
- name: Execute build
run: ./gradlew --info --stacktrace build