bromite-buildtools/.github/workflows/execute-tests.yaml

109 lines
3.5 KiB
YAML
Raw Normal View History

name: Execute Tests
permissions:
actions: none
checks: none
contents: none
deployments: none
issues: none
packages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
on:
workflow_dispatch:
inputs:
sha:
description: 'uazo/bromite SHA'
required: true
default: 'ce2f07034a3d3b257e9bada65d8293a6786bb95f'
env:
BROMITE_SHA: ${{ github.event.inputs.sha }}
REMOVEDOCKERSUPPORT: true
USELOCALIMAGE: true
2021-08-16 01:31:41 +05:30
VPYTHON_VIRTUALENV_ROOT: /home/lg/vpython_root
jobs:
get_image:
runs-on: self-hosted
steps:
- name: Mark image to test
shell: bash
run: |
docker tag uazo/bromite-build:$BROMITE_SHA uazo/bromite-build:test
exec-test:
runs-on: self-hosted
2021-08-10 14:15:27 +05:30
needs: get_image
if: success()
container:
image: uazo/bromite-build:test
env:
REMOVEDOCKERSUPPORT: true # CUSTOM RUNNER: remove sharing of docker socket
USELOCALIMAGE: true # CUSTOM RUNNER: permit use of local images
USEINTERNALNETWORK: true # CUSTOM RUNNER: create the docker network as internal
WORKSPACE: /home/lg/working_dir
ARTIFACS_DIR: /home/lg/working_dir/artifacs
volumes:
- /storage/images/${{ github.event.inputs.sha }}:/home/lg/working_dir/artifacs
steps:
2021-08-16 00:34:24 +05:30
#- name: Wait forever
# shell: bash
# run: |
# sleep infinity
2021-08-15 17:09:33 +05:30
- name: Prepare Test Container
shell: bash
run: |
# set workspace paths
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
cd $WORKSPACE
2021-08-16 00:32:41 +05:30
export VPYTHON_VIRTUALENV_ROOT=/home/lg/vpython_root
mkdir $VPYTHON_VIRTUALENV_ROOT
# copy artifacts
cd chromium/src
2021-08-16 00:32:41 +05:30
mkdir -p out/bromite
cp -arp $ARTIFACS_DIR/out/* out/bromite
mkdir -p out/tests
# reset proxy env
2021-08-10 15:24:05 +05:30
#HTTP_PROXY=
#HTTPS_PROXY=
#http_proxy=
#https_proxy=
- name: Execute junit tests
shell: bash
run: |
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
cd $WORKSPACE/chromium/src
2021-08-16 00:32:41 +05:30
out/bromite/bin/run_chrome_junit_tests | tee out/tests/chrome_junit_tests.log
out/bromite/bin/run_components_junit_tests | tee out/tests/components_junit_tests.log
out/bromite/bin/run_content_junit_tests | tee out/tests/content_junit_tests.log
out/bromite/bin/run_base_junit_tests | tee out/tests/base_junit_tests.log
out/bromite/bin/run_ui_junit_tests | tee out/tests/ui_junit_tests.log
- name: Execute c++ tests
shell: bash
run: |
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
cd $WORKSPACE/chromium/src
#out/bromite/bin/run_content_browsertests --avd-config tools/android/avd/proto/generic_android28.textpb | tee ~/content_browsertests.log
2021-08-16 00:32:41 +05:30
- name: Copy results
shell: bash
run: |
test -d $ARTIFACS_DIR/test_results && rm -rf $ARTIFACS_DIR/test_results
mkdir $ARTIFACS_DIR/test_results
cp -r $WORKSPACE/chromium/src/out/bromite/TEST_RESULTS* $ARTIFACS_DIR/test_results