add support for Enterasys WS-AP3715i #59
Workflow file for this run
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 package | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12.0-alpha - 3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry and flake8 | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 poetry | |
- name: Install project dependencies | |
run: | | |
poetry export -f requirements.txt --with dev --output requirements.txt | |
pip install -r requirements.txt | |
- name: Lint with flake8 | |
run: | | |
flake8 . --count --show-source --statistics | |
- name: Lint with pylint | |
run: | | |
pylint . | |
- name: Lint with mypy | |
# Python 3.12 is currently unsupported | |
# see https://github.com/python/mypy/issues/15277 | |
if: ${{ matrix.python-version != '3.12.0-alpha - 3.12' }} | |
run: | | |
mypy . | |
- name: Check formatting with black | |
run: | | |
black --check . | |
test_deploy: | |
runs-on: ubuntu-latest | |
name: Publish on Test PyPi | |
if: github.event_name == 'push' | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Install poetry | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- name: Build Python package | |
run: | | |
# PyPi does not allow local version (v1.0+xxx), so only count commits since latest tag | |
poetry version $(git describe --tags --always | sed 's/-\([0-9]\+\).*/.dev\1/') | |
poetry build | |
- name: Publish package to Test PyPi | |
uses: pypa/gh-action-pypi-publish@c7f29f7adef1a245bd91520e94867e5c6eedddcc # v1.6.4 | |
with: | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ |