Skip to content

Initial Robot Framework #80

Initial Robot Framework

Initial Robot Framework #80

Workflow file for this run

name: Robot Tests
on:
pull_request:
paths:
- '.github/workflows/robot-tests.yml'
- 'test/**'
- '!test/README.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
arch: [amd64, arm64]
include:
- os: windows-latest
target: win
- os: ubuntu-latest
target: lin
- os: macos-latest
target: mac
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install pip dependencies
run: |
pip install --upgrade pip
pip install -r test/requirements.txt
# - name: Cache vcpkg
# uses: actions/cache@v4
# with:
# key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}
# restore-keys: |
# vcpkg-${{ runner.os }}-${{ runner.arch }}-
# path: /home/runner/.vcpkg
# - name: Prepare vcpkg env
# working-directory: ./test
# run: |
# . <(curl https://aka.ms/vcpkg-init.sh -L)
# vcpkg x-update-registry --all
# vcpkg activate
- name: Setup vcpkg environment
uses: soumeh01/actions/vcpkg@testwindows
with:
config: "./test/vcpkg-configuration.json"
vcpkg-root: "${{ github.workspace }}/.vcpkg"
cache: "-"
- name: Activate Arm tool license
working-directory: ./test
run: |
armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
# python -m robot --outputdir ../reports-${{ matrix.os }} -x junit-report.xml src
- name: Run Test
working-directory: ./test
run: |
python -m robot --outputdir ../reports-${{ matrix.target }}-${{ matrix.arch }} --settag ${{ matrix.target }}-${{ matrix.arch }} --name ${{ matrix.target }}-${{ matrix.arch }} ./src
- name: Archieve test results
if: always()
uses: actions/upload-artifact@v4
with:
name: reports-${{ matrix.target }}-${{ matrix.arch }}
path: reports-${{ matrix.target }}-${{ matrix.arch }}
report:
runs-on: ubuntu-latest
if: always()
needs: test
permissions: write-all
steps:
- uses: actions/checkout@v4
- name: Download reports windows amd64
uses: actions/download-artifact@v4
with:
name: reports-win-amd64
path: reports-win-amd64
- name: Download reports windows arm64
uses: actions/download-artifact@v4
with:
name: reports-win-arm64
path: reports-win-arm64
- name: Download reports linux amd64
uses: actions/download-artifact@v4
with:
name: reports-lin-amd64
path: reports-lin-amd64
- name: Download reports linux arm64
uses: actions/download-artifact@v4
with:
name: reports-ubuntu-arm64
path: reports-ubuntu-arm64
- name: Download reports darwin amd64
uses: actions/download-artifact@v4
with:
name: reports-mac-amd64
path: reports-mac-amd64
- name: Download reports darwin arm64
uses: actions/download-artifact@v4
with:
name: reports-macos-arm64
path: reports-macos-arm64
- name: Consolidate robot test results
run: |
rebot --name Collective_Robot_Results --outputdir Collective_Robot_Results \
./reports-win-amd64/output.xml ./reports-win-amd64/output.xml \
./reports-ubuntu-arm64/output.xml ./reports-ubuntu-arm64/output.xml \
./reports-macos-amd64/output.xml ./reports-macos-arm64/output.xml
- name: Send macos report to commit
uses: joonvena/[email protected]
with:
report_path: Collective_Robot_Results
gh_access_token: ${{ secrets.GITHUB_TOKEN }}