Skip to content

Commit 7f0dbf2

Browse files
refactor CI configuration for consistency and clarity
1 parent aa06bdb commit 7f0dbf2

4 files changed

Lines changed: 46 additions & 66 deletions

File tree

.github/workflows/android_ci.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,40 @@
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-
- name: checkout repository
9-
uses: actions/checkout@v4
10-
- name: set up JDK 21
11-
uses: actions/setup-java@v4
8+
- uses: actions/checkout@v4
9+
- uses: actions/setup-java@v4
1210
with:
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: artifact test reports
20-
if: failure()
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()
2118
uses: actions/upload-artifact@v4
2219
with:
2320
name: test-report
2421
path: app/build/reports/tests/testDebugUnitTest/
25-
- name: publish unit test results
26-
if: always()
27-
uses: EnricoMi/publish-unit-test-result-action@v2
22+
- uses: EnricoMi/publish-unit-test-result-action@v2
2823
with:
2924
files: app/build/test-results/testDebugUnitTest/*.xml
30-
- name: coverage
31-
run: bash ./gradlew jacocoTestCoverageVerification --stacktrace
32-
- name: artifact reports
33-
uses: actions/upload-artifact@v4
25+
- run: ./gradlew jacocoTestCoverageVerification --stacktrace
26+
name: Coverage
27+
- uses: actions/upload-artifact@v4
3428
with:
3529
name: artifact-reports
3630
path: app/build/reports
37-
- name: upload coverage to Codecov
38-
uses: codecov/codecov-action@v4
31+
- uses: codecov/codecov-action@v4
3932
with:
4033
token: ${{ secrets.CODECOV_TOKEN }}
4134
file: ./app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml
42-
- name: build apk
43-
run: bash ./gradlew assembleDebug --stacktrace
44-
- name: artifact apk
45-
uses: actions/upload-artifact@v4
35+
- run: ./gradlew assembleDebug --stacktrace
36+
name: Build APK
37+
- uses: actions/upload-artifact@v4
4638
with:
4739
name: artifact-apk
48-
path: app/build/outputs/apk/debug
40+
path: app/build/outputs/apk/debug
Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
1-
name: "Android Instrumentation Tests"
1+
name: Android Instrumentation Tests
22
on:
33
push:
4-
branches:
5-
- release
4+
branches: [release]
65
jobs:
76
instrumentation_tests:
87
if: "!contains(github.event.head_commit.message, 'skip ci')"
98
runs-on: ubuntu-latest
109
steps:
11-
- name: checkout repository
12-
uses: actions/checkout@v4
13-
- name: set up JDK 21
14-
uses: actions/setup-java@v4
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-java@v4
1512
with:
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
13+
distribution: zulu
14+
java-version: 21
15+
- run: ./gradlew assembleDebug assembleAndroidTest
16+
- uses: emulator-wtf/run-tests@v0
2217
with:
2318
api-token: ${{ secrets.EW_API_TOKEN }}
2419
app: app/build/outputs/apk/debug/app-debug.apk
2520
test: app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
2621
outputs-dir: build/test-results
27-
- name: publish test results
28-
uses: mikepenz/action-junit-report@v5
22+
- uses: mikepenz/action-junit-report@v5
2923
if: always()
3024
with:
31-
report_paths: 'build/test-results/**/*.xml'
25+
report_paths: build/test-results/**/*.xml
Lines changed: 9 additions & 15 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,24 +10,18 @@ jobs:
1010
contents: read
1111
security-events: write
1212
strategy:
13-
fail-fast: false
1413
matrix:
15-
language: [ 'java-kotlin' ]
14+
language: [java-kotlin]
1615
steps:
17-
- name: Checkout repository
18-
uses: actions/checkout@v4
19-
- name: set up JDK 21
20-
uses: actions/setup-java@v4
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-java@v4
2118
with:
22-
distribution: 'zulu'
23-
java-version: '21'
24-
- name: Initialize CodeQL
25-
uses: github/codeql-action/init@v3
19+
distribution: zulu
20+
java-version: 21
21+
- uses: github/codeql-action/init@v3
2622
with:
2723
languages: ${{ matrix.language }}
28-
- name: Auto build
29-
uses: github/codeql-action/autobuild@v3
30-
- name: Perform CodeQL Analysis
31-
uses: github/codeql-action/analyze@v3
24+
- uses: github/codeql-action/autobuild@v3
25+
- uses: github/codeql-action/analyze@v3
3226
with:
3327
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)