Release 4.0.2 #62
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: build | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Lint and test | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements-dev.txt | |
python -m pip install -e . | |
- name: Run black | |
run: | | |
black --check . | |
- name: Run Tests | |
run: | | |
py.test --cov=napalm --cov-report term-missing -vs | |
release: | |
name: Build wheels and upload | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
python -m pip install -r requirements-dev.txt | |
- name: Build wheel | |
run: | | |
python setup.py bdist_wheel --build-number $GITHUB_RUN_NUMBER | |
- name: Upload to test | |
if: github.event_name == 'push' | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
skip_existing: true | |
- name: Upload Pypi | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |