|
| 1 | +# This file is managed by 'repo_helper'. Don't edit it directly. |
| 2 | +--- |
| 3 | +name: Linux |
| 4 | + |
| 5 | +on: |
| 6 | + push: |
| 7 | + pull_request: |
| 8 | + branches: ["master"] |
| 9 | + |
| 10 | +jobs: |
| 11 | + tests: |
| 12 | + name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}" |
| 13 | + runs-on: "ubuntu-20.04" |
| 14 | + continue-on-error: ${{ matrix.config.experimental }} |
| 15 | + env: |
| 16 | + USING_COVERAGE: '3.6,3.7,3.8,3.9' |
| 17 | + |
| 18 | + strategy: |
| 19 | + fail-fast: False |
| 20 | + matrix: |
| 21 | + config: |
| 22 | + - {python-version: "3.6", testenvs: "py36,build", experimental: False} |
| 23 | + - {python-version: "3.7", testenvs: "py37,build", experimental: False} |
| 24 | + - {python-version: "3.8", testenvs: "py38,build", experimental: False} |
| 25 | + - {python-version: "3.9", testenvs: "py39,build", experimental: False} |
| 26 | + |
| 27 | + steps: |
| 28 | + - name: Checkout 🛎️ |
| 29 | + uses: "actions/checkout@v2" |
| 30 | + |
| 31 | + - name: Setup Python 🐍 |
| 32 | + uses: "actions/setup-python@v2" |
| 33 | + with: |
| 34 | + python-version: "${{ matrix.config.python-version }}" |
| 35 | + |
| 36 | + - name: Install dependencies 🔧 |
| 37 | + run: | |
| 38 | + python -VV |
| 39 | + python -m site |
| 40 | + python -m pip install --upgrade pip setuptools wheel |
| 41 | + python -m pip install --upgrade tox virtualenv |
| 42 | +
|
| 43 | + - name: "Run Tests for Python ${{ matrix.config.python-version }}" |
| 44 | + run: python -m tox -e "${{ matrix.config.testenvs }}" |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + Deploy: |
| 49 | + needs: tests |
| 50 | + |
| 51 | + runs-on: "ubuntu-20.04" |
| 52 | + steps: |
| 53 | + - name: Checkout 🛎️ |
| 54 | + uses: "actions/checkout@v2" |
| 55 | + if: startsWith(github.ref, 'refs/tags/') |
| 56 | + |
| 57 | + - name: Setup Python 🐍 |
| 58 | + uses: "actions/setup-python@v2" |
| 59 | + with: |
| 60 | + python-version: 3.8 |
| 61 | + if: startsWith(github.ref, 'refs/tags/') |
| 62 | + |
| 63 | + - name: Install dependencies 🔧 |
| 64 | + run: | |
| 65 | + python -m pip install --upgrade pip setuptools wheel |
| 66 | + python -m pip install --upgrade tox |
| 67 | + if: startsWith(github.ref, 'refs/tags/') |
| 68 | + |
| 69 | + - name: Build distributions 📦 |
| 70 | + run: | |
| 71 | + tox -e build |
| 72 | +
|
| 73 | + if: startsWith(github.ref, 'refs/tags/') |
| 74 | + |
| 75 | + - name: Upload distribution to PyPI 🚀 |
| 76 | + if: startsWith(github.ref, 'refs/tags/') |
| 77 | + uses: pypa/gh-action-pypi-publish@master |
| 78 | + with: |
| 79 | + user: __token__ |
| 80 | + password: ${{ secrets.PYPI_TOKEN }} |
| 81 | + skip_existing: true |
0 commit comments