Repository navigation
98 lines (81 loc) · 2.29 KB
/
Copy pathtest.yml
File metadata and controls
98 lines (81 loc) · 2.29 KB
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
name: Tests
on:
workflow_dispatch:
workflow_call:
pull_request:
push:
jobs:
security:
name: Security Scan
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install bandit[toml]
- name: Run bandit security scan
run: bandit -r RADKitLibrary/ -ll -f json -o bandit-security-report.json
- name: Upload security report
uses: actions/upload-artifact@v4
if: always()
with:
name: bandit-security-report
path: bandit-security-report.json
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Pre-commit Checks
uses: pre-commit/action@v3.0.1
- name: Check License Headers
run: bash scripts/license-headers.sh
test:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Build distribution packages
run: uv build
- name: Install built package and test dependencies
run: |
uv venv
uv pip install "robotframework-radkit[genie]" --find-links dist pytest pytest-cov pytest-mock
- name: Verify library keywords with Libdoc
run: uv run --no-sync python -m robot.libdoc RADKitLibrary list
- name: Run tests
run: uv run --no-sync pytest --cov=RADKitLibrary --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v4
if: matrix.python == '3.12'
with:
file: ./coverage.xml