Merge pull request #60 from PlasmaControl/main #343
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: Python Check Push | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9, 3.11, 3.12] # 3 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest flake8 pytest-flake8-v2 mypy pytest-mypy pytest-cov \ | |
types-setuptools | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --exit-zero --show-source --statistics # --max-complexity=10 | |
- name: Test with pytest | |
run: | | |
pytest | |
- name: Test installed PyRCN | |
run: | | |
pip install . | |
pytest tests |