Skip to content

Commit d591ac2

Browse files
authored
Use GitHub actions (#40)
* Add Github Actions workflow to run tests * Add deployment workflow * Remove travis-related config and add readme instructions for running tests
1 parent ee15fbe commit d591ac2

File tree

6 files changed

+54
-45
lines changed

6 files changed

+54
-45
lines changed

.github/workflows/deploy.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Deploy
2+
on:
3+
release:
4+
types:
5+
- 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.x'
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/*

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Test
2+
on: push
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
python-version: [ 3.5, 3.6, 3.7, 3.8 ]
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -r requirements-dev-minimal.txt
21+
- name: Run tests
22+
run: |
23+
python -m unittest discover tests -t /

.travis.yml

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

Makefile

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

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ transaction.delete(mock_db.collection('users').document('alovelace'))
9595
transaction.commit()
9696
```
9797

98+
## Running the tests
99+
* Create and activate a virtualenv with a Python version of at least 3.5
100+
* Install dependencies with `pip install -r requirements-dev-minimal.txt`
101+
* Run tests with `python -m unittest discover tests -t /`
102+
98103
## Contributors
99104

100105
* [Matt Dowds](https://github.com/mdowds)

tox.ini

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

0 commit comments

Comments
 (0)