diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/automerge.yml | 27 | ||||
| -rw-r--r-- | .github/workflows/main.yml | 42 | ||||
| -rw-r--r-- | .github/workflows/python-tests.yml | 130 |
3 files changed, 69 insertions, 130 deletions
diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 00000000..4f70acfb --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,27 @@ +name: automerge +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: {} +jobs: + automerge: + runs-on: ubuntu-latest + steps: + - name: automerge + uses: "pascalgn/automerge-action@v0.12.0" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..37d65f33 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,42 @@ +name: tests + +on: [push, pull_request] + +jobs: + test: + strategy: + matrix: + python: [3.6, 3.8, 3.9, pypy3] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install tox + run: | + python -m pip install tox + - name: Run tests + run: tox + + release: + needs: test + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install tox + run: | + python -m pip install tox + - name: Release + run: tox -e release + env: + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml deleted file mode 100644 index 2ee7c0fb..00000000 --- a/.github/workflows/python-tests.yml +++ /dev/null @@ -1,130 +0,0 @@ -name: >- - 👷 - Test suite - -on: - push: - pull_request: - schedule: - - cron: 1 0 * * * # Run daily at 0:01 UTC - -jobs: - tests: - name: >- - ${{ matrix.python-version }} - / - ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - # max-parallel: 5 - matrix: - python-version: - - 3.9 - - 3.8 - - pypy3 - - 3.7 - - 3.6 - - 3.5 - os: - - ubuntu-18.04 - - ubuntu-16.04 - - macOS-latest - # - windows-2019 - # - windows-2016 - include: - # Dev versions (deadsnakes) - - os: ubuntu-20.04 - python-version: 3.9-dev - - os: ubuntu-20.04 - python-version: 3.8-dev - - env: - NETWORK_REQUIRED: 1 - PYTHON_VERSION: ${{ matrix.python-version }} - TOX_PARALLEL_NO_SPINNER: 1 - TOXENV: python - USE_DEADSNAKES: false - - steps: - - uses: actions/checkout@master - - name: Set flag to use deadsnakes - if: >- - endsWith(env.PYTHON_VERSION, '-beta') || - endsWith(env.PYTHON_VERSION, '-dev') - run: | - from __future__ import print_function - python_version = '${{ env.PYTHON_VERSION }}'.replace('-beta', '') - print('::set-env name=PYTHON_VERSION::{ver}'.format(ver=python_version)) - print('::set-env name=USE_DEADSNAKES::true') - shell: python - - name: Set up Python ${{ env.PYTHON_VERSION }} (deadsnakes) - uses: deadsnakes/action@v1.0.0 - if: fromJSON(env.USE_DEADSNAKES) && true || false - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v2.1.1 - if: >- - !fromJSON(env.USE_DEADSNAKES) && true || false - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Log Python version - run: >- - python --version - - name: Log Python location - run: >- - which python - - name: Log Python env - run: >- - python -m sysconfig - - name: Pip cache - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }} - restore-keys: | - ${{ runner.os }}-pip- - ${{ runner.os }}- - - name: Upgrade pip/setuptools/wheel - run: >- - python - -m pip install - --disable-pip-version-check - --upgrade - pip setuptools wheel - - name: Install tox - run: >- - python -m pip install --upgrade tox tox-venv - - name: Log installed dists - run: >- - python -m pip freeze --all - - name: Adjust TOXENV for PyPy - if: startsWith(env.PYTHON_VERSION, 'pypy') - run: >- - echo "::set-env name=TOXENV::${{ env.PYTHON_VERSION }}" - - name: Log env vars - run: >- - env - - - name: Verify that there's no cached Python modules in sources - if: >- - ! startsWith(matrix.os, 'windows-') - run: >- - ! grep pyc setuptools.egg-info/SOURCES.txt - - - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' - run: >- - python -m - tox - --parallel auto - --parallel-live - --notest - --skip-missing-interpreters false - - name: Test with tox - run: >- - python -m - tox - --parallel auto - --parallel-live - -- - -vvvvv |
