diff options
author | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2020-05-20 23:51:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 23:51:21 +0200 |
commit | f66f2ae4fb1d22f28d8835fa1063ea5342847e3b (patch) | |
tree | 8cc38ee4e63cedac5ee8c95c960f7ca2c83166dc | |
parent | 8e6aa2b5fd42cb257c86e6dbe720eaee6d1e2c9b (diff) | |
parent | e9a23bdd8b61e7da2d08bc0104cf3f84e5e746ac (diff) | |
download | setuptools-scm-f66f2ae4fb1d22f28d8835fa1063ea5342847e3b.tar.gz |
Merge pull request #434 from pypa/drop-travis
Drop Travis
-rw-r--r-- | .github/workflows/python-tests.yml | 46 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .travis.yml | 34 | ||||
-rw-r--r-- | testing/check_self_install.py | 5 | ||||
-rw-r--r-- | testing/runtests_travis.py | 20 |
5 files changed, 49 insertions, 58 deletions
diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 4822766..b34d0a6 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -6,7 +6,7 @@ on: branches: [master] jobs: - build: + test: runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -29,11 +29,32 @@ jobs: - run: pip install -e .[toml] pytest - run: pytest + check_selfinstall: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python_version: [ '2.7', '3.5', '3.6', '3.7', '3.8', 'pypy2', 'pypy3' ] + name: check self install - Python ${{ matrix.python_version }} + steps: + - uses: actions/checkout@v1 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python_version }} + architecture: x64 + # self install testing needs some clarity + # so its being executed without any other tools running + - run: pip install -U setuptools + - run: python setup.py sdist + - run: easy_install dist/* + - run: python testing/check_self_install.py + eggs: runs-on: ubuntu-latest - needs: [build] + needs: [test] name: Python ${{ matrix.python_version }} eggs strategy: matrix: @@ -59,7 +80,7 @@ jobs: dist: runs-on: ubuntu-latest - needs: [build] + needs: [test] name: Python bdist/wheel steps: - uses: actions/checkout@v1 @@ -78,15 +99,32 @@ jobs: name: dist path: dist + + dist_check: + runs-on: ubuntu-latest + needs: [eggs, dist] + steps: + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + - name: Install dependencies + run: pip install twine + - uses: actions/download-artifact@v2 + with: + name: dist + path: dist + - run: twine check 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] + needs: [dist_check] steps: - uses: actions/download-artifact@v2 with: name: dist + path: dist - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@master with: @@ -20,6 +20,8 @@ __pycache__/ # Distribution / packaging .env/ env/ +.venv/ +venv/ build/ dist/ .eggs/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9729c3b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: python - -stages: -- linting -- test - -python: -- '2.7' -- '3.7' -dist: xenial # needed for 3.7+ -env: -- TOXENV=py-test - -jobs: - include: - - stage: linting - name: check readme - python: '3.6' - env: TOXENV=check_readme - - stage: test - python: '2.7' - env: SELFINSTALL=1 - - stage: test - python: '3.6' - env: SELFINSTALL=1 - -cache: - directories: - - $HOME/.cache/pip - - $HOME/.cache/pre-commit - -install: pip install tox -script: -- python testing/runtests_travis.py diff --git a/testing/check_self_install.py b/testing/check_self_install.py new file mode 100644 index 0000000..de3ac79 --- /dev/null +++ b/testing/check_self_install.py @@ -0,0 +1,5 @@ +import pkg_resources +import setuptools_scm + +dist = pkg_resources.get_distribution("setuptools_scm") +assert dist.version == setuptools_scm.get_version(), dist.version diff --git a/testing/runtests_travis.py b/testing/runtests_travis.py deleted file mode 100644 index 752d660..0000000 --- a/testing/runtests_travis.py +++ /dev/null @@ -1,20 +0,0 @@ -from subprocess import call - -import os - -if os.environ.get("TOXENV"): - # normal tox run, lets jsut have tox do its job - import tox - - tox.cmdline() -elif os.environ.get("SELFINSTALL"): - # self install testing needs some clarity - # so its being executed without any other tools running - call("python setup.py sdist", shell=True) - call("easy_install dist/*", shell=True) - import pkg_resources - - dist = pkg_resources.get_distribution("setuptools_scm") - import setuptools_scm - - assert dist.version == setuptools_scm.get_version(), dist.version |