summaryrefslogtreecommitdiff
path: root/.github/workflows/python-tests.yml
diff options
context:
space:
mode:
authorRonny Pfannschmidt <opensource@ronnypfannschmidt.de>2019-12-14 00:23:40 +0100
committerRonny Pfannschmidt <ronny.pfannschmidt@redhat.com>2020-05-01 22:26:47 +0200
commitb536c087bf5fc76febff44ea38315928beb0e168 (patch)
treed1d668710f3b8c53d925076da9c2144a5e5809f7 /.github/workflows/python-tests.yml
parentc534e8a6dadb0b8830cc79203e62b6a1a966acaf (diff)
downloadsetuptools-scm-b536c087bf5fc76febff44ea38315928beb0e168.tar.gz
add python testsworkflows
port testsuite to pathlib, and try to resolve windows short paths trace git toplevel mismatch (observed on win32 name shortening) exclude python2 on windows remove the appveyor config, its broken drop most travis envs that we have in github workflows now add actions for creating egg artifacts/wheels/sdists WIP: experiment with act WIP: fix workflow typo WIP: add missed runs-on fix typoed excludes fixup: upload actuall wheel/sdist in the build step style fixes for the actions config
Diffstat (limited to '.github/workflows/python-tests.yml')
-rw-r--r--.github/workflows/python-tests.yml94
1 files changed, 94 insertions, 0 deletions
diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml
new file mode 100644
index 0000000..4822766
--- /dev/null
+++ b/.github/workflows/python-tests.yml
@@ -0,0 +1,94 @@
+name: python tests+artifacts+release
+
+on:
+ pull_request:
+ push:
+ branches: [master]
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ python_version: [ '2.7', '3.5', '3.6', '3.7', '3.8', 'pypy2', 'pypy3' ]
+ os: [windows-latest, ubuntu-latest] #, macos-latest]
+ exclude:
+ - os: windows-latest
+ python_version: "2.7"
+ - os: windows-latest
+ python_version: "pypy2"
+ name: ${{ matrix.os }} - Python ${{ matrix.python_version }}
+ steps:
+ - uses: actions/checkout@v1
+ - name: Setup python
+ uses: actions/setup-python@v1
+ with:
+ python-version: ${{ matrix.python_version }}
+ architecture: x64
+ - run: pip install -e .[toml] pytest
+ - run: pytest
+
+
+ eggs:
+ runs-on: ubuntu-latest
+
+ needs: [build]
+ name: Python ${{ matrix.python_version }} eggs
+ strategy:
+ matrix:
+ python_version: ['2.7', '3.5', '3.6', '3.7', '3.8']
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up Python
+ uses: actions/setup-python@v1
+ with:
+ python-version: ${{ matrix.python_version }}
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install --upgrade wheel setuptools
+ - name: Build package
+ run: |
+ python setup.py bdist_egg
+ - uses: actions/upload-artifact@v2
+ with:
+ name: dist
+ path: dist
+
+ dist:
+ runs-on: ubuntu-latest
+
+ needs: [build]
+ name: Python bdist/wheel
+ steps:
+ - uses: actions/checkout@v1
+ - uses: actions/setup-python@v1
+ with:
+ python-version: "3.8"
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install --upgrade wheel setuptools
+ - name: Build package
+ run: |
+ python setup.py bdist_wheel sdist
+ - uses: actions/upload-artifact@v2
+ with:
+ name: dist
+ path: dist
+
+ dist_upload:
+
+ runs-on: ubuntu-latest
+ if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pypa/setuptools_scm'
+ needs: [eggs, dist]
+ steps:
+ - uses: actions/download-artifact@v2
+ with:
+ name: dist
+ - name: Publish package to PyPI
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ user: __token__
+ password: ${{ secrets.pypi_token }}