Skip to content

Commit d25ef24

Browse files
Refactor CI configuration for improved clarity and consistency
1 parent f5d94d0 commit d25ef24

File tree

4 files changed

+60
-51
lines changed

4 files changed

+60
-51
lines changed

.github/workflows/android_ci.yml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,37 @@
1-
name: Android CI
2-
on: [push, pull_request]
1+
name: "Android CI"
2+
on: [ push, pull_request ]
33
jobs:
44
test:
55
if: "!contains(github.event.head_commit.message, 'skip ci')"
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v4
9-
- uses: actions/setup-java@v4
8+
- name: checkout repository
9+
uses: actions/checkout@v4
10+
- name: set up JDK 21
11+
uses: actions/setup-java@v4
1012
with:
11-
distribution: zulu
12-
java-version: 21
13-
- run: ./gradlew lintDebug --stacktrace
14-
name: Lint
15-
- run: ./gradlew testDebugUnitTest --stacktrace
16-
name: Unit Tests
17-
- if: failure()
13+
distribution: 'zulu'
14+
java-version: '21'
15+
- name: lint
16+
run: bash ./gradlew lintDebug --stacktrace
17+
- name: unit tests
18+
run: bash ./gradlew testDebugUnitTest --stacktrace
19+
- name: coverage
20+
run: bash ./gradlew jacocoTestCoverageVerification --stacktrace
21+
- name: artifact reports
1822
uses: actions/upload-artifact@v4
19-
with:
20-
name: test-report
21-
path: app/build/reports/tests/testDebugUnitTest/
22-
- uses: EnricoMi/publish-unit-test-result-action@v2
23-
with:
24-
files: app/build/test-results/testDebugUnitTest/*.xml
25-
- run: ./gradlew jacocoTestCoverageVerification --stacktrace
26-
name: Coverage
27-
- uses: actions/upload-artifact@v4
2823
with:
2924
name: artifact-reports
3025
path: app/build/reports
31-
- uses: codecov/codecov-action@v4
26+
- name: upload coverage to Codecov
27+
uses: codecov/codecov-action@v4
3228
with:
3329
token: ${{ secrets.CODECOV_TOKEN }}
3430
file: ./app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml
35-
- run: ./gradlew assembleDebug --stacktrace
36-
name: Build APK
37-
- uses: actions/upload-artifact@v4
31+
- name: build apk
32+
run: bash ./gradlew assembleDebug --stacktrace
33+
- name: artifact apk
34+
uses: actions/upload-artifact@v4
3835
with:
3936
name: artifact-apk
40-
path: app/build/outputs/apk/debug
37+
path: app/build/outputs/apk/debug
Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
1-
name: Android Instrumentation Tests
1+
name: "Android Instrumentation Tests"
22
on:
33
push:
4-
branches: [release]
4+
branches:
5+
- release
56
jobs:
67
instrumentation_tests:
78
if: "!contains(github.event.head_commit.message, 'skip ci')"
89
runs-on: ubuntu-latest
910
steps:
10-
- uses: actions/checkout@v4
11-
- uses: actions/setup-java@v4
11+
- name: checkout repository
12+
uses: actions/checkout@v4
13+
- name: set up JDK 21
14+
uses: actions/setup-java@v4
1215
with:
13-
distribution: zulu
14-
java-version: 21
15-
- run: ./gradlew assembleDebug assembleAndroidTest
16-
- uses: emulator-wtf/run-tests@v0
16+
distribution: 'zulu'
17+
java-version: '21'
18+
- name: build apks
19+
run: bash ./gradlew assembleDebug assembleAndroidTest
20+
- name: run tests
21+
uses: emulator-wtf/run-tests@v0
1722
with:
1823
api-token: ${{ secrets.EW_API_TOKEN }}
1924
app: app/build/outputs/apk/debug/app-debug.apk
2025
test: app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
2126
outputs-dir: build/test-results
22-
- uses: mikepenz/action-junit-report@v5
27+
- name: publish test results
28+
uses: mikepenz/action-junit-report@v5
2329
if: always()
2430
with:
25-
report_paths: build/test-results/**/*.xml
31+
report_paths: 'build/test-results/**/*.xml'
Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "CodeQL Analyze"
2-
on: [push, pull_request]
2+
on: [ push, pull_request ]
33
jobs:
44
analyze:
55
if: "!contains(github.event.head_commit.message, 'skip ci')"
@@ -10,18 +10,24 @@ jobs:
1010
contents: read
1111
security-events: write
1212
strategy:
13+
fail-fast: false
1314
matrix:
14-
language: [java-kotlin]
15+
language: [ 'java-kotlin' ]
1516
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/setup-java@v4
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
- name: set up JDK 21
20+
uses: actions/setup-java@v4
1821
with:
19-
distribution: zulu
20-
java-version: 21
21-
- uses: github/codeql-action/init@v3
22+
distribution: 'zulu'
23+
java-version: '21'
24+
- name: Initialize CodeQL
25+
uses: github/codeql-action/init@v3
2226
with:
2327
languages: ${{ matrix.language }}
24-
- uses: github/codeql-action/autobuild@v3
25-
- uses: github/codeql-action/analyze@v3
28+
- name: Auto build
29+
uses: github/codeql-action/autobuild@v3
30+
- name: Perform CodeQL Analysis
31+
uses: github/codeql-action/analyze@v3
2632
with:
2733
category: "/language:${{matrix.language}}"

.github/workflows/stale.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Mark stale issues and pull requests
22
on:
33
schedule:
4-
- cron: 30 6 1 * *
4+
- cron: '30 6 1 * *'
55
jobs:
66
stale:
77
runs-on: ubuntu-latest
@@ -12,9 +12,9 @@ jobs:
1212
- uses: actions/stale@v9
1313
with:
1414
repo-token: ${{ secrets.GITHUB_TOKEN }}
15-
stale-issue-message: This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
16-
stale-pr-message: This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
17-
stale-issue-label: stale
18-
stale-pr-label: stale
19-
exempt-issue-labels: bug,high-priority
20-
days-before-stale: 365
15+
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
16+
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
17+
stale-issue-label: 'stale'
18+
stale-pr-label: 'stale'
19+
exempt-issue-labels: 'bug,high-priority'
20+
days-before-stale: 365

0 commit comments

Comments
 (0)