Skip to content

Merge pull request #182 from pypa/legacy-release-deprecn-notice #140

Merge pull request #182 from pypa/legacy-release-deprecn-notice

Merge pull request #182 from pypa/legacy-release-deprecn-notice #140

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
isort:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Install Tox
run: |
pip install tox
- name: Run tests
run: tox -e isort
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: "dev-requirements.txt"
- name: Install Tox
run: |
pip install tox
- name: Run tests
run: tox -e python
publish:
runs-on: ubuntu-latest
needs: tests
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
cache: pip
cache-dependency-path: "tox.ini"
- name: Install Tox
run: |
pip install tox
- name: Publish to PyPI
run: tox -e release
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TOX_TESTENV_PASSENV: "FLIT_USERNAME FLIT_PASSWORD"