forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (113 loc) · 3.68 KB
/
mobile-android_tests.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
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
106
107
108
109
110
111
112
113
114
115
116
name: android_tests
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.head_ref-github.workflow || github.run_id }}
cancel-in-progress: true
jobs:
kotlintestsmac:
if: github.repository == 'envoyproxy/envoy'
# revert to //test/kotlin/... once fixed
# https://github.com/envoyproxy/envoy-mobile/issues/1932
name: kotlin_tests_mac
runs-on: macos-12
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: should_run
name: 'Check whether to run'
run: ./mobile/tools/should_run_ci.sh
- name: 'Java setup'
if: steps.should_run.outputs.run_ci_job == 'true'
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2
with:
java-version: '8'
java-package: jdk
architecture: x64
distribution: zulu
- name: 'Install dependencies'
if: steps.should_run.outputs.run_ci_job == 'true'
run: cd mobile && ./ci/mac_ci_setup.sh
- name: 'Run Kotlin library tests'
if: steps.should_run.outputs.run_ci_job == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mobile && ./bazelw test \
--test_output=all \
--build_tests_only \
$([ -z $GITHUB_TOKEN ] || echo "--config=remote-ci-macos") \
//test/kotlin/io/...
javatestsmac:
if: github.repository == 'envoyproxy/envoy'
name: java_tests_mac
runs-on: macos-12
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: should_run
name: 'Check whether to run'
run: ./mobile/tools/should_run_ci.sh
- name: 'Java setup'
if: steps.should_run.outputs.run_ci_job == 'true'
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2
with:
java-version: '8'
java-package: jdk
architecture: x64
distribution: zulu
- name: 'Install dependencies'
if: steps.should_run.outputs.run_ci_job == 'true'
run: cd mobile && ./ci/mac_ci_setup.sh
- name: 'Run Java library tests'
if: steps.should_run.outputs.run_ci_job == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mobile && ./bazelw test \
--test_output=all \
--build_tests_only \
--config test-android \
--define envoy_mobile_listener=enabled \
$([ -z $GITHUB_TOKEN ] || echo "--config=remote-ci-macos") \
--define=signal_trace=disabled \
//test/java/...
kotlintestslinux:
if: github.repository == 'envoyproxy/envoy'
# Only kotlin tests are executed since with linux:
# https://github.com/envoyproxy/envoy-mobile/issues/1418.
name: kotlin_tests_linux
runs-on: ubuntu-20.04
timeout-minutes: 90
container:
image: envoyproxy/envoy-build-ubuntu:mobile-321658b6b50abda6869f89fac275f59bf3b1e757
env:
CC: /opt/llvm/bin/clang
CXX: /opt/llvm/bin/clang++
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add safe directory
run: git config --global --add safe.directory /__w/envoy/envoy
- id: should_run
name: 'Check whether to run'
run: ./mobile/tools/should_run_ci.sh
- name: 'Run Kotlin library integration tests'
if: steps.should_run.outputs.run_ci_job == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mobile && ./bazelw test \
--test_output=all \
--build_tests_only \
--config test-android \
$([ -z $GITHUB_TOKEN ] || echo "--config=remote-ci-linux-clang") \
//test/kotlin/...