Skip to content

Commit de306fe

Browse files
committed
ci: add github actions workflow
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
1 parent f56be8d commit de306fe

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: test
2+
3+
on: [push, pull_request]
4+
5+
permissions: read-all
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
13+
steps:
14+
- name: 'Checkout'
15+
uses: actions/checkout@v4
16+
- name: 'Set up Python ${{ matrix.python-version }}'
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: 'Install variantlib'
21+
run: |
22+
# aligning version if variantlib with the one used in this project:
23+
# * https://github.com/wheelnext/pep_xxx_wheel_variants
24+
python3 -m pip install git+https://github.com/wheelnext/variantlib@008ba22
25+
- name: 'Install project'
26+
run: |
27+
python3 --version
28+
python3 -m pip install -e .
29+
python3 -m pip install -e ".[test]"
30+
- name: 'Run pytest'
31+
run: |
32+
python3 -m pytest tests/
33+
- name: 'Test variantlib plugins list'
34+
run: |
35+
variantlib plugins list >_list.txt
36+
grep xpu _list.txt
37+
- name: 'Test variantlib plugins get-supported-configs'
38+
run: |
39+
variantlib plugins get-supported-configs >_configs.txt
40+
# File should be empty as runner does not have intel gpu
41+
test ! -s _configs.txt
42+
- name: 'Test variantlib plugins validate-property'
43+
run: |
44+
variantlib plugins validate-property "xpu::device_ip::12.55.8" >_props.txt
45+
grep " valid" _props.txt
46+
variantlib plugins validate-property "xpu::device_ip::0.0.0" >_props.txt
47+
grep invalid _props.txt
48+
variantlib plugins validate-property "xpu::nosuchprop::12.55.8" >_props.txt
49+
grep invalid _props.txt

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dependencies = []
1717
test = [
1818
"pytest",
1919
"pytest-mock",
20+
"variantlib",
2021
]
2122

2223
[project.urls]

0 commit comments

Comments
 (0)