-
Notifications
You must be signed in to change notification settings - Fork 14
68 lines (56 loc) · 1.85 KB
/
daily-build-fhirr4.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: daily-build-fhirr4
on:
schedule:
- cron: '40 19 * * *' # 01:10 in LK time (GMT+5:30)
workflow_dispatch:
env:
BALLERINA_VERSION: 2201.8.6
jobs:
build:
runs-on: ubuntu-latest
env:
JAVA_OPTS: -Xmx4G
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set Up Ballerina
uses: ballerina-platform/[email protected]
with:
version: $BALLERINA_VERSION
- name: Setup Maven
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Create settings.xml
run: echo '<settings>
<servers>
<server>
<id>ballerina-language-repo</id>
<username>${{ github.actor }}</username>
<password>${{ secrets.GITHUB_TOKEN }}</password>
</server>
</servers>
</settings>' > ~/.m2/settings.xml
- name: Run Maven Build
run: |
mvn clean install -f fhirr4
- name: Generate Coverage Report
run: |
cd fhirr4/ballerina/target/classes/fhirservice
bal test --test-report --code-coverage --coverage-format=xml
- name: Find Coverage Reports
run: |
FIND_REPORTS=$(find "fhirr4" -name 'coverage-report.xml' || true)
if [[ $FIND_REPORTS != '' ]]; then
echo "REPORTS=${FIND_REPORTS}" >> $GITHUB_ENV
else
echo "No coverage reports found."
fi
- name: Upload Coverage Reports to Codecov
if: ${{env.REPORTS}}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true # Optional: Specify if the CI build should fail when Codecov fails.
flags: fhirr4