Skip to content

Commit e0ecbb5

Browse files
authored
Merge pull request #66 from Yelp/gcoll_add_github_actions
Add GitHub actions
2 parents e95420c + 9237c72 commit e0ecbb5

File tree

3 files changed

+62
-15
lines changed

3 files changed

+62
-15
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: CI
3+
4+
# Controls when the action will run.
5+
on:
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
release:
11+
jobs:
12+
tox:
13+
runs-on: ubuntu-20.04
14+
strategy:
15+
fail-fast: false
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.6
21+
# GHA won't setup tox for us and we use tox-pip-extensions for venv-update
22+
- run: pip install tox==3.2 tox-pip-extensions==1.3.0
23+
- run: make test

.github/workflows/pypi.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Upload to PyPI
3+
4+
on:
5+
push:
6+
tags:
7+
- v*
8+
9+
jobs:
10+
tox:
11+
runs-on: ubuntu-20.04
12+
strategy:
13+
fail-fast: false
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.6
19+
# GHA won't setup tox for us and we use tox-pip-extensions for venv-update
20+
- run: pip install tox==3.2 tox-pip-extensions==1.3.0
21+
- run: make test
22+
pypi:
23+
# lets run tests before we push anything to pypi, much like we do internally
24+
needs: tox
25+
runs-on: ubuntu-20.04
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions/setup-python@v2
29+
with:
30+
python-version: 3.6
31+
# GHA won't setup tox for us and we use tox-pip-extensions for venv-update
32+
# and we need wheel for actually building wheels :p
33+
- run: pip install tox==3.2 tox-pip-extensions==1.3.0 wheel
34+
# this will create an sdist and wheel under dist/
35+
- run: python setup.py sdist bdist_wheel
36+
# and then this uploads those artifacts to pypi
37+
- uses: pypa/[email protected]
38+
with:
39+
password: ${{ secrets.pypi_password }}

.travis.yml

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

0 commit comments

Comments
 (0)