-
Notifications
You must be signed in to change notification settings - Fork 6
72 lines (70 loc) · 2.27 KB
/
check.yml
File metadata and controls
72 lines (70 loc) · 2.27 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
65
66
67
68
69
70
71
72
name: Check project
on:
workflow_call:
inputs:
run-on:
type: string
required: true
description: "runner to check the project"
task:
type: string
required: true
description: "task to check the platform targets"
upload-code-coverage:
type: boolean
description: "enabled uploading coverage report to codecov"
required: false
default: false
collect-code-coverage:
type: boolean
description: "enables collecting coverage reports and uploading them as artifacts"
required: false
default: false
secrets:
CODECOV_TOKEN:
description: "token to upload codecov report"
required: false
jobs:
check:
runs-on: ${{ inputs.run-on }}
steps:
- name: 'Install native dependencies'
run: sudo apt-get install -y libunistring-dev
if: runner.os == 'Linux'
- name: 'Checkout Repository'
uses: actions/checkout@v6
with:
submodules: true
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version-file: .java-version
- uses: actions/setup-python@v6
with:
python-version-file: .python-version
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v5
- name: Cache konan
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
gradle-version: wrapper
- name: Build
run: ./gradlew --no-daemon --info ${{ inputs.task }} koverXmlReport -x :benchmark:benchmark --build-cache
- name: Upload coverage reports to Codecov
if: inputs.upload-code-coverage && github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Collect coverage reports
if: inputs.collect-code-coverage && github.actor != 'dependabot[bot]'
uses: actions/upload-artifact@v5
with:
name: coverage-reports
path: '**/build/reports/kover/report.xml'