-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (37 loc) · 1.13 KB
/
pr.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
name: PR Build
on:
pull_request
jobs:
pr-build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java 17 for Gradle
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Gradle Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
key: ${{runner.os}}-build-gradle-${{hashFiles('**/gradle-wrapper.properties')}}
- name: Prepare parameters
run: |
git log --pretty=format:"%H - %an, %aI : %s" -5
mkdir -p ~/.gradle
echo "GITHUB_TOKEN=${{secrets.PACKAGES_TOKEN}}" > ~/.gradle/gradle.properties
echo "GITHUB_USERNAME=Robothy" >> ~/.gradle/gradle.properties
chmod +x gradlew
pwd
ls -l
- name: Build
run: ./gradlew mergeReports
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./build/reports/jacoco/mergeReports/mergeReports.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}