Replace Non-test Assertions with Value Errors #432
Workflow file for this run
This file contains hidden or 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: Python CI Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| - copybara_push | |
| pull_request: | |
| branches: | |
| - master | |
| - main | |
| - copybara_push | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| # there is no 3.10.15 on mac | |
| # see: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | |
| os: [ubuntu-latest] | |
| python-version: ['3.10.15', '3.11'] | |
| include: | |
| - os: macos-15-intel # updated intel-based | |
| python-version: '3.11' | |
| - os: macos-latest # arm-based | |
| python-version: '3.11' | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install system dependencies (on Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler ffmpeg | |
| - name: Install system dependencies (on Mac) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew update | |
| brew install protobuf@21 ffmpeg | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| pip install poetry==2.1.2 | |
| poetry install --with dev | |
| - name: Run the Python formatter | |
| run: | | |
| source .venv/bin/activate | |
| pyink . | |
| - name: Run the Python import sorter | |
| run: | | |
| source .venv/bin/activate | |
| isort . | |
| - name: Run the Python style checker | |
| run: | | |
| source .venv/bin/activate | |
| pylint --rcfile=.pylintrc --ignore=proto smart_control | |
| - name: Run the Markdown formatter | |
| run: | | |
| source .venv/bin/activate | |
| mdformat README.md docs/*.md --check | |
| - name: Run tests | |
| run: | | |
| source .venv/bin/activate | |
| pytest --disable-pytest-warnings |