Update test.yml #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will triage pull requests and apply a label based on the | |
# paths that are modified in the pull request. | |
# | |
# To use this workflow, you will need to set up a .github/labeler.yml | |
# file with configuration. For more information, see: | |
# https://github.com/actions/labeler | |
name: Regression Test | |
on: | |
pull_request: | |
types: [opened, edited, review_requested, synchronize, review_request_removed, reopened] | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch to test' | |
type: string | |
default: 'iec_efr32' | |
test_mg12: | |
description: 'Run test with MG12?' | |
type: boolean | |
default: 'true' | |
test_mg24: | |
description: 'Run test with MG24MG24?' | |
type: boolean | |
default: 'true' | |
mg12_serialnum: | |
description: 'Serial number of target board to test for GCC MG12' | |
type: string | |
default: '440111030' | |
mg12_hostip: | |
type: string | |
default: '192.168.1.69' | |
mg24_serialnum: | |
description: 'Serial number of target board to test for GCC MG12' | |
type: string | |
default: '440124068' | |
mg24_hostip: | |
type: string | |
default: '192.168.1.100' | |
security: | |
description: 'NON_SECURE_EN= true "CRC_32=1%20NON_SECURE_EN=false%20N_CRC_DEBUG=1%20APP_SECURE=false"' | |
type: string | |
default: 'APP_SECURE=false' | |
command: | |
type: choice | |
options: | |
- gen-only | |
- run-only | |
- all | |
component: | |
type: choice | |
options: | |
- all | |
- cpu_registers | |
- programme_counter | |
- invariable_memory | |
- system_clock | |
- varmg24 == 'true' | |
needs: [job1, job2, job3, job4] | |
name: IAR-MG24 regression test | |
runs-on: [self-hosted, sqa-ds-hn-006] | |
permissions: | |
contents: read | |
pull-requests: write | |
env: | |
COMPILER: IAR | |
PLATFORM: MG24 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
ref: "${{ github.event.inputs.branch }}" | |
if: github.event_name == 'workflow_dispatch' | |
- name: Checkout | |
uses: actions/[email protected] | |
if: github.event_name == 'pull_request' | |
- name: Setup environment variables | |
run: | |
export HOST_IP=${{ github.event.inputs.mg24_hostip }} && | |
export SERIAL_NUM=${{ github.event.inputs.mg24_serialnum }} && | |
export SECURITY=${{ github.event.inputs.security }} && | |
export COMMAND=${{ github.event.inputs.command }} && | |
export COMPONENT=${{ github.event.inputs.component }} | |
if: github.event_name == 'workflow_dispatch' | |
- name: Check working directory | |
run: | |
pwd && | |
ls -la | |
- name: Prepare Test directory | |
run: | |
chmod -R 777 ./Test | |
- name: Assign environment variables | |
run: | |
whoami | |
export HOST_IP=$HOST_IP && | |
export TOOL_DIRS=/home/sqa/EmbeddedWorkbench8.4/arm/bin && | |
export APP_TYPE=SecureApp | |
- name: Testing | |
run: | |
cd Test && | |
ls -la && | |
./execute_test.sh $COMMAND $COMPONENT $SERIAL_NUM $PLATFORM $COMPILER $SECURITY | |
- name: Generate test report | |
run: | |
cd Test/ && | |
ls -la && | |
python test_script/get_report.py | |
- name: Upload results and logs | |
uses: actions/[email protected] | |
with: | |
path: | |
result/ | |
artifact/ | |
log/ | |
warn: Output a warning but do not fail the action | |
retention-days: 90 | |