-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (39 loc) · 1.52 KB
/
ci.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
45
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@nightly
with:
args:
pack
env:
WORKING_DIR: ./excel
- name: Ballerina Test
uses: ballerina-platform/ballerina-action/@nightly
with:
args:
test --code-coverage
env:
WORKING_DIR: ./excel
REFRESH_URL: ${{ secrets.REFRESH_URL }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
WORKBOOK_PATH: ${{ secrets.WORKBOOK_PATH }}
# Read the ballerina test results
- name: Read Ballerina Test Results
id: test_results
run: |
content=`cat ./excel/target/report/test_results.json`
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=testResultsJson::$content"
# Print the code coverage information
- name: Code Coverage
run: |
echo "Code Coverage Percentage : ${{fromJson(steps.test_results.outputs.testResultsJson).coveragePercentage}}"