Skip to content

Update unit handling #668

Update unit handling

Update unit handling #668

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:
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: Checkout vss-tools
uses: actions/checkout@v3
- name: Install apt dependencies
run: sudo apt install -y protobuf-compiler
- name: Setup Python
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: |
pipenv install --deploy --dev
- name: Run mypy, fail on errors.
run: |
pipenv install mypy types-setuptools types-PyYAML
pipenv run mypy *.py vspec tests contrib
- name: Run flake8, errors not accepted!
run: |
pipenv install flake8
pipenv run flake8 *.py vspec tests contrib
- name: Run tests
run: |
pipenv run pytest
- name: Build binary library
run: |
cd binary
make
- name: Test Binary Go Parser
run: |
cd 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@v3
- 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