Skip to content

Add jsonschema exporter for VSS. #638

Add jsonschema exporter for VSS.

Add jsonschema exporter for VSS. #638

Workflow file for this run

name: Standard Build Check
on:
push:
branches: [ master ]
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
concurrency:
group: ci-check-${{ github.ref }}
cancel-in-progress: true
env:
VSS_PATH: ${{ github.workspace }}/vehicle_signal_specification
VSS_TOOLS_PATH: ${{ github.workspace }}/vehicle_signal_specification/vss-tools
PYTHON_VERSION: "3.8.12" # keep in sync with vss-tools/Pipfile!
CI: 1 # shall any script needs to know if it's running in the CI
jobs:
buildtest:
runs-on: ubuntu-latest
steps:
- name: Install apt dependencies
run: sudo apt install -y protobuf-compiler
- name: Checkout VSS as parent
uses: actions/checkout@v3
with:
repository: COVESA/vehicle_signal_specification
path: ${{ env.VSS_PATH }}
submodules: false
- name: Remove VSS vss-tools from parent
run: |
rm -rf ${{ env.VSS_TOOLS_PATH }}
- name: Checkout vss-tools inside vehicle_signal_specification/
uses: actions/checkout@v3
with:
path: ${{ env.VSS_TOOLS_PATH }}
- uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pipenv
- name: Install pipenv
run: |
python -m pip --quiet --no-input install --upgrade pip
python -m pip --quiet --no-input install --upgrade pipenv wheel
- name: Install dependencies with pipenv
run: |
cd ${{ env.VSS_TOOLS_PATH }}
pipenv install --deploy --dev
- name: Test mandatory targets
run: |
cd ${{ env.VSS_TOOLS_PATH }}
pipenv run make -C "${{ env.VSS_PATH }}" travis_targets
- name: Test optional targets.
run: |
cd ${{ env.VSS_TOOLS_PATH }}
pipenv run make -C "${{ env.VSS_PATH }}" -k travis_optional ||
echo "::warning title=travis_optional::optional targets FAILED"
- name: Run mypy, fail on errors.
run: |
cd ${{ env.VSS_TOOLS_PATH }}
pipenv install mypy types-setuptools types-PyYAML
pipenv run mypy *.py vspec tests contrib
- name: Run flake8, for now always succeed.
run: |
cd ${{ env.VSS_TOOLS_PATH }}
pipenv install flake8
pipenv run flake8 *.py vspec tests contrib ||
echo "::warning title=flake8::Errors reported"
- name: Test Binary Go Parser
run: |
# As of now run here, not included in Makefile
cd ${{ env.VSS_TOOLS_PATH }}/binary/go_parser
go build -o gotestparser testparser.go
go list -m -json -buildvcs=false all
pypitest:
name: Test PyPI packaging
runs-on: ubuntu-latest
steps:
- name: Checkout vss-tools
uses: actions/checkout@v2
- name: Test Pypi packaging
run: |
# Separate build as we want a clean environment to make sure all dependencies are present
python -m pip --quiet --no-input install --upgrade pip
pip install -e .
- name: Test that tools can be started
run: |
# Verify that it works from any directory
mkdir /tmp/pypi_vss_test
cd /tmp/pypi_vss_test
# Just verify that we can start the tools
vspec2x.py --help
vspec2csv.py --help
vspec2json.py --help
vspec2yaml.py --help
vspec2franca.py --help
vspec2ddsidl.py --help
vspec2protobuf.py --help
vspec2graphql.py --help