-
Notifications
You must be signed in to change notification settings - Fork 95
63 lines (63 loc) · 1.86 KB
/
code-coverage.yaml
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
name: Code Coverage
on:
workflow_dispatch:
pull_request_target:
types:
- closed
branches:
- 'main'
concurrency:
group: codecov-${{ github.event.number || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.23"
- name: Install Revive
shell: sh
run: |
go install github.com/mgechev/[email protected]
- name: Cache Ballerina.
uses: actions/cache@v3
id: cache
with:
path: "ballerina-dist/*.deb"
key: "ballerina-2201.10.2"
- name: Download Ballerina distribution.
shell: sh
run: |
mkdir -p ballerina-dist
wget 'https://dist.ballerina.io/downloads/2201.10.2/ballerina-2201.10.2-swan-lake-linux-x64.deb' -P ballerina-dist
if: steps.cache.outputs.cache-hit != 'true'
- name: Install Ballerina distribution.
shell: sh
run: "sudo dpkg -i ballerina-dist/ballerina-2201.10.2-swan-lake-linux-x64.deb"
- name: Verify Ballerina Version
shell: sh
run: "bal -v"
- name: Checkout apk-repo
uses: actions/checkout@v3
with:
fetch-depth: "0"
token: ${{ secrets.APK_BOT_TOKEN }}
- name: Set release username and email
shell: sh
run: |
git config --global user.name ${{ secrets.APK_BOT_USER }}
git config --global user.email ${{ secrets.APK_BOT_EMAIL }}
- name: Run Gradle Build
run: |
./build-apk.sh
- name: run codecov
uses: codecov/codecov-action@v3
with:
verbose: true # optional (default = false)