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

209 lines
9.2 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
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 }}/out:/home/lg/working_dir/chromium/src/out/bromite:r
2021-09-06 13:18:48 +05:30
- /storage/images/${{ github.event.inputs.sha }}/out/tests:/home/lg/working_dir/chromium/src/out/tests
2021-08-18 14:31:25 +05:30
options: --device=/dev/kvm
steps:
- 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-31 15:15:31 +05:30
# copy artifacts
#cd chromium/src
#mkdir -p out/bromite
#cp -arp $ARTIFACS_DIR/out/* out/bromite
2021-08-16 00:32:41 +05:30
2021-09-06 13:18:48 +05:30
rm -rf out/tests/*
#mkdir -p out/tests
# reset proxy env
2021-08-10 15:24:05 +05:30
#HTTP_PROXY=
#HTTPS_PROXY=
#http_proxy=
#https_proxy=
2021-09-01 19:19:13 +05:30
# - name: Wait forever
# shell: bash
# run: |
# sleep infinity
2021-08-17 13:51:53 +05:30
2021-08-16 02:21:17 +05:30
- name: Execute chrome junit test
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 02:21:17 +05:30
out/bromite/bin/run_chrome_junit_tests | tee out/tests/chrome_junit_tests.log || KO=1
2021-08-16 02:21:17 +05:30
- name: Execute components junit test
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_components_junit_tests | tee out/tests/components_junit_tests.log || KO=1
- name: Execute content junit test
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_junit_tests | tee out/tests/content_junit_tests.log || KO=1
- name: Execute base junit test
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_base_junit_tests | tee out/tests/base_junit_tests.log || KO=1
- name: Execute ui junit test
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_ui_junit_tests | tee out/tests/ui_junit_tests.log || KO=1
2021-09-01 19:10:36 +05:30
- name: Start Android Emulator
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-09-01 19:10:36 +05:30
sudo mkdir -p /github/home/.android
sudo chmod 666 /github/home/.android/
tools/android/avd/avd.py install --avd-config ../../generic_android31.textpb -v
tools/android/avd/avd.py start --avd-config ../../generic_android31.textpb -v
- name: Execute gtests components/content_settings
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-09-01 20:20:55 +05:30
tools/autotest.py -C out/bromite/ --run-all components/content_settings --dry-run | grep "Running test: " | cut -b 15- | sed -e 's|--gtest_filter|-v --gtest_filter|' | xargs -d\\n -n1 bash -c || KO=1
2021-09-01 19:10:36 +05:30
- name: Execute gtests components/url_formatter
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-09-01 20:20:55 +05:30
tools/autotest.py -C out/bromite/ --run-all components/url_formatter --dry-run | grep "Running test: " | cut -b 15- | sed -e 's|--gtest_filter|-v --gtest_filter|' | xargs -d\\n -n1 bash -c || KO=1
2021-09-01 19:10:36 +05:30
- name: Execute gtests components/crash
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-09-01 20:20:55 +05:30
tools/autotest.py -C out/bromite/ --run-all components/crash --dry-run | grep "Running test: " | cut -b 15- | sed -e 's|--gtest_filter|-v --gtest_filter|' | xargs -d\\n -n1 bash -c || KO=1
2021-09-01 19:10:36 +05:30
- name: Execute gtests components/prefs
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-09-01 20:20:55 +05:30
tools/autotest.py -C out/bromite/ --run-all components/prefs --dry-run | grep "Running test: " | cut -b 15- | sed -e 's|--gtest_filter|-v --gtest_filter|' | xargs -d\\n -n1 bash -c || KO=1
2021-09-01 19:10:36 +05:30
- name: Execute gtests components/subresource_filter
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-09-01 20:20:55 +05:30
tools/autotest.py -C out/bromite/ --run-all components/subresource_filter --dry-run | grep "Running test: " | cut -b 15- | sed -e 's|--gtest_filter|-v --gtest_filter|' | xargs -d\\n -n1 bash -c || KO=1
2021-09-01 19:10:36 +05:30
- name: Execute gtests components/bookmarks
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-09-01 20:20:55 +05:30
tools/autotest.py -C out/bromite/ --run-all components/bookmarks --dry-run | grep "Running test: " | cut -b 15- | sed -e 's|--gtest_filter|-v --gtest_filter|' | xargs -d\\n -n1 bash -c || KO=1
2021-09-01 19:10:36 +05:30
2021-09-06 17:54:24 +05:30
- name: Restart Android Emulator
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
pkill -f qemu-system-x86
tools/android/avd/avd.py start --avd-config ../../generic_android31.textpb -v
2021-09-01 19:10:36 +05:30
- name: Execute gtests components/download
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-09-01 20:20:55 +05:30
tools/autotest.py -C out/bromite/ --run-all components/download --dry-run | grep "Running test: " | cut -b 15- | sed -e 's|--gtest_filter|-v --gtest_filter|' | xargs -d\\n -n1 bash -c || KO=1
2021-09-01 19:10:36 +05:30
- name: Execute gtests components/history
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-09-01 20:20:55 +05:30
tools/autotest.py -C out/bromite/ --run-all components/history --dry-run | grep "Running test: " | cut -b 15- | sed -e 's|--gtest_filter|-v --gtest_filter|' | xargs -d\\n -n1 bash -c || KO=1
2021-09-01 19:10:36 +05:30
- name: Execute run_content_browsertests
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-09-01 20:20:55 +05:30
out/bromite/bin/run_content_browsertests -v --fast-local-dev || KO=1
2021-09-06 17:54:24 +05:30
#- name: Wait forever
# shell: bash
# run: |
# sleep infinity
2021-09-01 20:20:55 +05:30
2021-08-16 00:32:41 +05:30
- name: Copy results
shell: bash
run: |
2021-09-06 17:54:24 +05:30
sudo cp -r $WORKSPACE/chromium/src/out/bromite/TEST_RESULTS* $WORKSPACE/chromium/src/out/tests/
2021-08-16 00:32:41 +05:30