Testing pre-commit #75
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: Standard Build Check | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
workflow_dispatch: | |
concurrency: | |
group: ci-check-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
PYTHON_VERSION: "3.10.6" # 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@v4 | |
- name: Install apt dependencies | |
run: sudo apt install -y protobuf-compiler | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
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@v4 | |
- 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 | |
vspec2csv.py --help | |
vspec2json.py --help | |
vspec2yaml.py --help | |
vspec2franca.py --help | |
vspec2ddsidl.py --help | |
vspec2protobuf.py --help | |
vspec2graphql.py --help |