forked from Open-CMSIS-Pack/cmsis-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (89 loc) · 2.89 KB
/
robot-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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:
robot-tests:
runs-on: ubuntu-latest
env:
CMSIS_PACK_ROOT: /home/runner/.cache/arm/packs
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/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: |
. <(curl https://aka.ms/vcpkg-init.sh -L)
vcpkg x-update-registry --all
vcpkg activate
- name: Activate Arm tool license
working-directory: ./test
run: |
. /home/runner/.vcpkg/vcpkg-init
vcpkg activate
armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
# - name: Run Test
# working-directory: ./test
# run: |
# . /home/runner/.vcpkg/vcpkg-init
# vcpkg activate
# python -m robot --outputdir reports -x junit-report.xml src/test.robot
- name: Run tests
uses: joonvena/robotframework-docker-action@v1.0
with:
robot_tests_dir: ./test/src
# - name: Run Test and create report
# working-directory: ./test
# run: |
# python -m robot -d reports -x junit-report.xml "src/test.robot"
- name: Run Robot Framework tests and generate report
if: always()
run: |
echo "ROBOT_RC=$?" >> "$GITHUB_ENV"
- name: Archieve test results
if: always()
uses: actions/upload-artifact@v4
with:
name: reports
path: reports
# - name: Publish Test Results
# uses: EnricoMi/publish-unit-test-result-action/linux@v2.16.1
# if: always()
# with:
# files: |
# ./test/reports/junit-report.xml
generate_report:
runs-on: ubuntu-latest
needs: robot-tests
steps:
- uses: actions/checkout@v4
- name: Download reports
uses: actions/download-artifact@v1
with:
name: reports
- name: Send report to commit
uses: joonvena/robotframework-reporter-action@v2.4
with:
gh_access_token: ${{ secrets.GITHUB_TOKEN }}