Skip to content

Commit a2d1dff

Browse files
authored
Merge pull request #47 from dabapps/github-actions
Switch to Github Actions
2 parents 4099045 + 1879095 commit a2d1dff

File tree

4 files changed

+54
-32
lines changed

4 files changed

+54
-32
lines changed

.github/workflows/ci.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-18.04
9+
10+
strategy:
11+
matrix:
12+
python: [3.6, 3.7, 3.8]
13+
django: [1.8, 1.11, 2.2, 3.1]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python }}
21+
- name: Install dependencies
22+
run: pip install -r requirements.txt
23+
- name: Install Django
24+
run: pip install -U django==${{ matrix.django }}
25+
- name: Run tests
26+
run: ./manage.py test
27+
- name: Check install
28+
run: pip install .

.github/workflows/pypi.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: '3.8'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload dist/*

.travis.yml

-23
This file was deleted.

setup.py

-9
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,6 @@ def get_package_data(package):
5757
return {package: filepaths}
5858

5959

60-
if sys.argv[-1] == 'publish':
61-
os.system("python setup.py sdist upload")
62-
args = {'version': get_version(package)}
63-
print("You probably want to also tag the version now:")
64-
print(" git tag -a %(version)s -m 'version %(version)s'" % args)
65-
print(" git push --tags")
66-
sys.exit()
67-
68-
6960
setup(
7061
name=name,
7162
version=get_version(package),

0 commit comments

Comments
 (0)