-
Notifications
You must be signed in to change notification settings - Fork 29
69 lines (57 loc) 路 1.79 KB
/
continuous-delivery-pipeline.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
name: Continuous Delivery Pipeline
# This is responsible for the whole delivery pipeline (build, integrate, test and release)
on:
push:
branches:
- main
- development
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
build:
strategy:
matrix:
config: [
{ target: android, os: ubuntu-latest, tasks: "testDebugUnitTest testReleaseUnitTest :app-android:test", continueOnError: false },
{ target: ios, os: macos-12, tasks: "iosX64Test iosSimulatorArm64Test", continueOnError: false },
{ target: desktop, os: windows-latest, tasks: "desktopTest :app-desktop:test", continueOnError: false },
]
runs-on: ${{ matrix.config.os }}
name: Build ${{ matrix.config.target }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: gradle
- uses: maxim-lobanov/setup-xcode@v1
if: ${{ matrix.config.target == 'ios' }}
with:
xcode-version: latest-stable
- name: Build all
run: |
./gradlew --console=plain build --stacktrace
unit_tests:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: 'gradle'
- name: Run tests
run: |
./gradlew --console=plain test --stacktrace
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v2
with:
name: tests
path: ./**/build/reports/tests