Python test PR148 #22
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 test | |
| run-name: Python test PR${{ github.event.number }} | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| python-test: | |
| name: Python tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Get Python modules | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install pycodestyle mypy | |
| - name: Check code style | |
| run: | | |
| python3 -m pycodestyle --config .pycodestyle.ini ./*.py | |
| python3 -m pycodestyle --config .pycodestyle.ini ./lglpy | |
| python3 -m pycodestyle --config .pycodestyle.ini ./generator | |
| - name: Check typing | |
| run: | | |
| python3 -m mypy ./*.py | |
| python3 -m mypy ./lglpy | |
| python3 -m mypy ./generator | |
| - name: Run unit tests | |
| # Note: Only run tests that do not require a connected device | |
| run: | | |
| python3 -m lglpy.ui.test |