Unit Tests #317
Workflow file for this run
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: Run Unit Tests | |
on: [push, pull_request] | |
jobs: | |
buildtest: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.10.x | |
- name: Install dependencies | |
run: | | |
python -V | |
pip install pyyaml | |
pip install pytest | |
pip install anytree | |
pip install jinja2 | |
pip install dacite | |
- name: Install ifex module | |
run: | | |
python setup.py develop | |
- name: Run unit test | |
run: | | |
pytest -v | |
- name: Prepare for test using latest VSC | |
run: | | |
git clone https://github.com/COVESA/vehicle_service_catalog/ | |
- name: Run example tool on latest VSC | |
run: | | |
ifexgen vehicle_service_catalog/comfort-service.yml simple_overview.tpl | |
- name: Run DTDL template on latest VSC | |
run: | | |
ifexgen vehicle_service_catalog/comfort-service.yml dtdl.tpl > dtdl.out | |
- name: Run Protobuf template on latest VSC and verify output is correct Proto | |
run: | | |
sudo apt install -y protobuf-compiler | |
ifexgen vehicle_service_catalog/comfort-service.yml protobuf.tpl > comfort-service.proto | |
mkdir tmp | |
protoc --cpp_out=tmp comfort-service.proto | |
- name: Run BAMM template on latest VSC | |
run: | | |
ifexgen vehicle_service_catalog/comfort-service.yml sds-bamm-aspect-model.tpl > bamm.out |