|
1 | 1 | name: Unit Tests |
2 | 2 | on: [push, pull_request] |
3 | | - |
4 | 3 | jobs: |
5 | 4 | mixed_tests: |
6 | 5 | runs-on: ubuntu-24.04 |
7 | 6 | strategy: |
8 | 7 | matrix: |
9 | 8 | python-version: |
10 | | - - '3.10.x' |
11 | | - - '3.11.x' |
12 | | - - '3.12.x' |
13 | | - - 'pypy3.10' |
14 | | - |
| 9 | + - '3.10' |
| 10 | + - '3.11' |
| 11 | + - '3.12' |
| 12 | + - 'pypy3.10' |
15 | 13 | steps: |
16 | 14 | - uses: actions/checkout@v4 |
17 | | - |
18 | | - - name: Setup Python |
19 | | - uses: actions/setup-python@v5 |
| 15 | + - name: Install uv |
| 16 | + uses: astral-sh/setup-uv@v6 |
20 | 17 | with: |
21 | 18 | python-version: ${{ matrix.python-version }} |
22 | | - |
23 | 19 | - name: Install dependencies |
24 | 20 | run: | |
25 | 21 | python -V |
26 | | - pip install -r requirements.txt |
27 | | - pip install -r requirements-dev.txt |
28 | | -
|
29 | | - - name: Install ifex module |
30 | | - run: | |
31 | | - pip install -e . |
32 | | -
|
| 22 | + uv sync --group=dev |
33 | 23 | - name: Run unit tests |
34 | 24 | run: | |
35 | | - pytest -v tests |
36 | | -
|
| 25 | + uv run pytest -v tests |
37 | 26 | - name: Clone VSC repository |
38 | 27 | run: | |
39 | 28 | git clone https://github.com/COVESA/vehicle_service_catalog/ |
40 | | -
|
41 | 29 | - name: Run simple generator tool on VSC content |
42 | 30 | run: | |
43 | | - ifexgen vehicle_service_catalog/comfort-service.yml -d simple |
44 | | -
|
| 31 | + uv run ifexgen vehicle_service_catalog/comfort-service.yml -d simple |
45 | 32 | - name: Run DTDL template |
46 | 33 | run: | |
47 | | - ifexgen vehicle_service_catalog/comfort-service.yml -d dtdl > dtdl.out |
48 | | -
|
| 34 | + uv run ifexgen vehicle_service_catalog/comfort-service.yml -d dtdl > dtdl.out |
49 | 35 | - name: Run Protobuf template and verify output is correct Proto |
50 | 36 | run: | |
51 | 37 | sudo apt install -y protobuf-compiler |
52 | | - ifexgen vehicle_service_catalog/comfort-service.yml -d protobuf > comfort-service.proto |
| 38 | + uv run ifexgen vehicle_service_catalog/comfort-service.yml -d protobuf > comfort-service.proto |
53 | 39 | mkdir tmp |
54 | 40 | protoc --cpp_out=tmp comfort-service.proto |
55 | | -
|
56 | 41 | - name: Run BAMM template |
57 | 42 | run: | |
58 | | - ifexgen vehicle_service_catalog/comfort-service.yml -d sds-bamm > bamm.out |
59 | | -
|
| 43 | + uv run ifexgen vehicle_service_catalog/comfort-service.yml -d sds-bamm > bamm.out |
60 | 44 | - name: Run D-Bus generator |
61 | 45 | run: | |
62 | | - ifexgen_dbus vehicle_service_catalog/comfort-service.yml >d-bus.out |
| 46 | + uv run ifexgen_dbus vehicle_service_catalog/comfort-service.yml >d-bus.out |
63 | 47 | cat d-bus.out |
64 | | -
|
65 | 48 | - name: Run JSON-Schema generator |
66 | 49 | run: | |
67 | | - python ifex/output_filters/schema/ifex_to_json_schema.py >temp-schema |
68 | | - python ifex/output_filters/schema/pretty_print_json.py temp-schema >ifex-core-idl-schema.json |
69 | | -
|
| 50 | + uv run ifex/output_filters/schema/ifex_to_json_schema.py >temp-schema |
| 51 | + uv run ifex/output_filters/schema/pretty_print_json.py temp-schema >ifex-core-idl-schema.json |
70 | 52 | - name: Clone uservices repository |
71 | 53 | run: | |
72 | 54 | git clone https://github.com/COVESA/uservices/ |
73 | | -
|
74 | 55 | - name: Run protobuf->IFEX translation |
75 | 56 | run: | |
76 | | - ifexconv_protobuf uservices/src/main/proto/vehicle/chassis/suspension/v1/suspension_topics.proto >suspension_topics.ifex |
| 57 | + uv run ifexconv_protobuf uservices/src/main/proto/vehicle/chassis/suspension/v1/suspension_topics.proto >suspension_topics.ifex |
77 | 58 | cat suspension_topics.ifex |
0 commit comments