Skip to content

Commit f66f2ae

Browse files
Merge pull request #434 from pypa/drop-travis
Drop Travis
2 parents 8e6aa2b + e9a23bd commit f66f2ae

File tree

5 files changed

+49
-58
lines changed

5 files changed

+49
-58
lines changed

.github/workflows/python-tests.yml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches: [master]
77

88
jobs:
9-
build:
9+
test:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
fail-fast: false
@@ -29,11 +29,32 @@ jobs:
2929
- run: pip install -e .[toml] pytest
3030
- run: pytest
3131

32+
check_selfinstall:
33+
runs-on: ubuntu-latest
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
python_version: [ '2.7', '3.5', '3.6', '3.7', '3.8', 'pypy2', 'pypy3' ]
38+
name: check self install - Python ${{ matrix.python_version }}
39+
steps:
40+
- uses: actions/checkout@v1
41+
- name: Setup python
42+
uses: actions/setup-python@v2
43+
with:
44+
python-version: ${{ matrix.python_version }}
45+
architecture: x64
46+
# self install testing needs some clarity
47+
# so its being executed without any other tools running
48+
- run: pip install -U setuptools
49+
- run: python setup.py sdist
50+
- run: easy_install dist/*
51+
- run: python testing/check_self_install.py
52+
3253

3354
eggs:
3455
runs-on: ubuntu-latest
3556

36-
needs: [build]
57+
needs: [test]
3758
name: Python ${{ matrix.python_version }} eggs
3859
strategy:
3960
matrix:
@@ -59,7 +80,7 @@ jobs:
5980
dist:
6081
runs-on: ubuntu-latest
6182

62-
needs: [build]
83+
needs: [test]
6384
name: Python bdist/wheel
6485
steps:
6586
- uses: actions/checkout@v1
@@ -78,15 +99,32 @@ jobs:
7899
name: dist
79100
path: dist
80101

102+
103+
dist_check:
104+
runs-on: ubuntu-latest
105+
needs: [eggs, dist]
106+
steps:
107+
- uses: actions/setup-python@v2
108+
with:
109+
python-version: "3.8"
110+
- name: Install dependencies
111+
run: pip install twine
112+
- uses: actions/download-artifact@v2
113+
with:
114+
name: dist
115+
path: dist
116+
- run: twine check dist/*
117+
81118
dist_upload:
82119

83120
runs-on: ubuntu-latest
84121
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pypa/setuptools_scm'
85-
needs: [eggs, dist]
122+
needs: [dist_check]
86123
steps:
87124
- uses: actions/download-artifact@v2
88125
with:
89126
name: dist
127+
path: dist
90128
- name: Publish package to PyPI
91129
uses: pypa/gh-action-pypi-publish@master
92130
with:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ __pycache__/
2020
# Distribution / packaging
2121
.env/
2222
env/
23+
.venv/
24+
venv/
2325
build/
2426
dist/
2527
.eggs/

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

testing/check_self_install.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import pkg_resources
2+
import setuptools_scm
3+
4+
dist = pkg_resources.get_distribution("setuptools_scm")
5+
assert dist.version == setuptools_scm.get_version(), dist.version

testing/runtests_travis.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)