forked from envoyproxy/envoy-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.36 KB
/
python_tests.yml
File metadata and controls
42 lines (40 loc) · 1.36 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
name: python_tests
on:
push:
branches:
- main
pull_request:
jobs:
pythontests:
name: python_tests
runs-on: ubuntu-latest
timeout-minutes: 90
container:
image: envoyproxy/envoy-build-ubuntu:0a02a76af5951bf7f4c7029c0ea6d29d96c0f682
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Add safe directory
run: git config --global --add safe.directory /__w/envoy-mobile/envoy-mobile
- id: check_context
name: 'Check whether to run'
run: |
if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git diff --name-only origin/main | grep -qe common/ -e cc/ -e python/ -e bazel/ -e ^\.bazelrc$ -e ^envoy$ -e ^WORKSPACE$ -e ^.github/workflows/python_tests.yml$ ; then
echo "Tests will run."
echo "::set-output name=run_tests::true"
else
echo "Skipping tests."
echo "::set-output name=run_tests::false"
fi
- name: 'Run tests'
if: steps.check_context.outputs.run_tests == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./bazelw test \
--action_env=LD_LIBRARY_PATH \
--test_output=all \
--config=remote-ci-linux \
--remote_header="Authorization=Bearer $GITHUB_TOKEN" \
//test/python/...