-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (67 loc) · 2.46 KB
/
common_test.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
69
70
71
72
73
74
75
76
77
78
name: Common Tests CI
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
KMP-Android:
runs-on: macos-latest
if: contains(github.event.head_commit.message, 'trigger build')
steps:
# Code checkout
- name: Checkout code
id: checkout_code
uses: actions/checkout@v4
- name: Job set up
uses: ./.github/actions/job-set-up
# Copy secrets
- name: Copy secrets
id: copy_secrets
shell: bash
env:
API_READ_ACCESS_TOKEN: ${{ secrets.API_READ_ACCESS_TOKEN }}
DB_ENCRYPTION_PASS: ${{ secrets.DB_ENCRYPTION_PASS }}
run: |
touch ./local.properties
echo api_read_access_token=\"$API_READ_ACCESS_TOKEN\" >> ./local.properties
echo db_encryption_pass=\"$DB_ENCRYPTION_PASS\" >> ./local.properties
cat ./local.properties
- name: Run Common Android Unit Tests
run: ./gradlew testDebugUnitTest -p shared/
- name: Upload Common Android Unit Tests Report
if: always()
uses: actions/upload-artifact@v4
with:
path: /Users/runner/work/movieskmm/movieskmm/shared/build/reports/tests/testDebugUnitTest/
KMP-iOS:
runs-on: macos-latest
if: contains(github.event.head_commit.message, 'trigger build')
steps:
# Code checkout
- name: Checkout code
id: checkout_code
uses: actions/checkout@v4
- name: Job set up
uses: ./.github/actions/job-set-up
# Copy secrets
- name: Copy secrets
id: copy_secrets
shell: bash
env:
API_READ_ACCESS_TOKEN: ${{ secrets.API_READ_ACCESS_TOKEN }}
DB_ENCRYPTION_PASS: ${{ secrets.DB_ENCRYPTION_PASS }}
run: |
touch ./local.properties
echo api_read_access_token=\"$API_READ_ACCESS_TOKEN\" >> ./local.properties
echo db_encryption_pass=\"$DB_ENCRYPTION_PASS\" >> ./local.properties
cat ./local.properties
- name: Run Common iOS Unit Tests
run: if [[ $(uname -m) == 'arm64' ]]; then ./gradlew iosSimulatorArm64Test -p shared/; else ./gradlew iosX64Test -p shared/; fi
- name: Upload Common iOS Unit Tests Report
if: always()
uses: actions/upload-artifact@v4
with:
path:
/Users/runner/work/movieskmm/movieskmm/shared/build/reports/tests/iosSimulatorArm64Test/
/Users/runner/work/movieskmm/movieskmm/shared/build/reports/tests/iosX64Test/