Skip to content

[bp/1.25] Backport stack #6927

[bp/1.25] Backport stack

[bp/1.25] Backport stack #6927

Workflow file for this run

name: android_tests
on:
push:
branches:
- main
pull_request:
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@v1
- 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@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c
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") \
--remote_header="Authorization=Bearer $GITHUB_TOKEN" \
//test/kotlin/io/...
javatestsmac:
if: github.repository == 'envoyproxy/envoy'
name: java_tests_mac
runs-on: macos-12
timeout-minutes: 120
steps:
- uses: actions/checkout@v1
- 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@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c
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 \
$([ -z $GITHUB_TOKEN ] || echo "--config=remote-ci-macos") \
--remote_header="Authorization=Bearer $GITHUB_TOKEN" \
--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:7304f974de2724617b7492ccb4c9c58cd420353a
env:
CC: /opt/llvm/bin/clang
CXX: /opt/llvm/bin/clang++
steps:
- uses: actions/checkout@v1
- 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: 'Java setup'
if: steps.should_run.outputs.run_ci_job == 'true'
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c
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/linux_ci_setup.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") \
--remote_header="Authorization=Bearer $GITHUB_TOKEN" \
//test/kotlin/...