Run Robot tests on CI #37
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
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 }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
vcpkg-version: ['2024.03'] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
- name: Setup vcpkg | ||
uses: microsoft/vcpkg@${{ matrix.vcpkg-version }} | ||
Check failure on line 27 in .github/workflows/robot-tests.yml GitHub Actions / Robot TestsInvalid workflow file
|
||
with: | ||
vcpkg-configuration: test/vcpkg-configuration.json | ||
# runs-on: ${{ matrix.config.os }} | ||
# name: 'Test (${{ matrix.config.target }}, ${{ matrix.config.arch }})' | ||
# strategy: | ||
# fail-fast: true | ||
# matrix: | ||
# config: | ||
# - { os: macos-12, target: darwin, arch: amd64 } | ||
# - { os: macos-12, target: darwin, arch: arm64 } | ||
# - { os: windows-2019, target: windows, arch: amd64} | ||
# - { os: windows-2019, target: windows, arch: arm64} | ||
# - { os: ubuntu-20.04, target: linux, arch: amd64} | ||
# - { os: ubuntu-20.04, target: linux, arch: arm64} | ||
- 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/configs/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: | | ||
# vcpkg x-update-registry --all | ||
# vcpkg activate | ||
- name: Activate Arm tool license | ||
working-directory: ./test | ||
run: | | ||
vcpkg activate | ||
armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0 | ||
- name: Run Test | ||
working-directory: ./test | ||
run: | | ||
vcpkg activate | ||
python -m robot --outputdir ../reports -x junit-report.xml src/test.robot | ||
- name: Archieve test results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: reports | ||
path: reports | ||
report: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
permissions: write-all | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download reports | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: reports | ||
path: reports | ||
- name: Send report to commit | ||
uses: joonvena/robotframework-reporter-action@v2.4 | ||
with: | ||
gh_access_token: ${{ secrets.GITHUB_TOKEN }} | ||