forked from j-kaltes/Juggluco
-
Notifications
You must be signed in to change notification settings - Fork 12
108 lines (94 loc) · 3.56 KB
/
Copy pathnightscout-follower-tests.yml
File metadata and controls
108 lines (94 loc) · 3.56 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Nightscout Follower Tests
on:
push:
branches: [feat-rob, main]
paths:
- 'Common/src/test/java/tk/glucodata/drivers/nightscout/**'
- 'Common/src/main/java/tk/glucodata/drivers/nightscout/**'
- '.github/workflows/nightscout-follower-tests.yml'
pull_request:
branches: [feat-rob, main]
paths:
- 'Common/src/test/java/tk/glucodata/drivers/nightscout/**'
- 'Common/src/main/java/tk/glucodata/drivers/nightscout/**'
workflow_dispatch:
jobs:
nightscout-follower-unit-tests:
name: NightscoutFollowerRegistry Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-nsftests-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-nsftests-
- name: Run Nightscout Follower Registry tests
run: |
./gradlew :Common:testMobileLibre3SiDexGoogleDebugUnitTest \
--tests "tk.glucodata.drivers.nightscout.*" \
--no-daemon \
--warning-mode=all
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: nightscout-follower-test-report
path: |
Common/build/reports/tests/testMobileLibre3SiDexGoogleDebugUnitTest/
Common/build/test-results/testMobileLibre3SiDexGoogleDebugUnitTest/
# Runs on a schedule: every 30 minutes during working hours
# Keeps the feature rock-solid through iterative testing.
# The schedule can be adjusted or triggered manually.
nightscout-follower-iterative-test:
name: Iterative Nightscout Follower Tests (30min)
runs-on: ubuntu-latest
# Run every 30 minutes between 06:00 and 22:00 UTC
# Cron: "*/30 6-22 * * *" — disabled by default; enable via workflow_dispatch or uncomment
# schedule:
# - cron: "*/30 6-22 * * *"
# Uncomment the line below and use workflow_dispatch to trigger manually,
# or enable the schedule above for automated iterative testing.
# For now we leave it as workflow_dispatch only.
if: github.event_name == 'workflow_dispatch'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-nsftests-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-nsftests-
- name: Run full unit test suite for nightscout follower
run: |
./gradlew :Common:testMobileLibre3SiDexGoogleDebugUnitTest \
--tests "tk.glucodata.drivers.nightscout.*" \
--rerun-tasks \
--no-daemon
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: iterative-test-report-${{ github.run_number }}
path: |
Common/build/reports/tests/testMobileLibre3SiDexGoogleDebugUnitTest/
Common/build/test-results/testMobileLibre3SiDexGoogleDebugUnitTest/