-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (99 loc) · 3.06 KB
/
Copy pathci.yml
File metadata and controls
105 lines (99 loc) · 3.06 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
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
android:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
- uses: gradle/actions/setup-gradle@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.10"
bundler-cache: true
- name: Install Android SDK components
run: |
sdkmanager="$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
if [[ ! -x "$sdkmanager" ]]; then
echo "Android SDK manager is unavailable: $sdkmanager" >&2
exit 1
fi
"$sdkmanager" "platforms;android-36" "build-tools;36.0.0"
- run: bundle exec fastlane android checks
- name: Publish test and lint reports
if: always()
uses: actions/upload-artifact@v7
with:
name: android-test-reports
path: |
app/build/reports/tests/
app/build/test-results/
app/build/reports/lint-results-*
if-no-files-found: warn
retention-days: 14
- uses: actions/upload-artifact@v7
id: apk
with:
name: message487-builds
path: |
app/build/outputs/apk/**/*.apk
app/build/outputs/bundle/**/*.aab
if-no-files-found: error
retention-days: 14
- name: Link build artifacts
env:
ARTIFACT_URL: ${{ steps.apk.outputs.artifact-url }}
run: echo "[Download debug APK and unsigned release APK/AAB]($ARTIFACT_URL)" >> "$GITHUB_STEP_SUMMARY"
python:
name: Python tests and style
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.10"
bundler-cache: true
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: requirements-dev.txt
- run: python -m pip install -r requirements-dev.txt
- run: bundle exec fastlane android python_checks
dev-server:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- run: docker compose -f DevServer/compose.yaml up -d --wait --wait-timeout 300
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.10"
bundler-cache: true
- run: bundle exec fastlane android server_tests
- name: Server logs
if: failure()
run: docker compose -f DevServer/compose.yaml logs --tail 150
- name: Stop server
if: always()
run: docker compose -f DevServer/compose.yaml down