Skip to content

Commit 7bc19a9

Browse files
authored
Merge pull request #123 from amadeus4dev/migrate-github-actions
Migrate to Github actions
2 parents b17344b + 858c48f commit 7bc19a9

2 files changed

Lines changed: 53 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
# Sequence of patterns matched against refs/tags
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
jobs:
8+
build:
9+
runs-on: Ubuntu-18.04
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
python-version: [3.4, 3.5, 3.6.8]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install sphinx
25+
pip install tox
26+
pip install sphinx_rtd_theme
27+
pip install virtualenv==20.0.1
28+
- name: Test with tox
29+
run: |
30+
tox -e py
31+
- name: Before deploy
32+
run: |
33+
pip install -e .
34+
pip install --upgrade setuptools
35+
make docs
36+
- name: Build binary wheel and a source tarball
37+
if: ${{ matrix.python-version == '3.6.8' }}
38+
run: python setup.py sdist
39+
- name: Publish a Python distribution to PyPI
40+
if: ${{ matrix.python-version == '3.6.8' }}
41+
uses: pypa/gh-action-pypi-publish@release/v1
42+
with:
43+
user: __token__
44+
password: ${{ secrets.PYPI_API_TOKEN }}

tox.ini

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@ deps =
1515
flake8-quotes==0.14.0
1616
usedevelop=True
1717

18-
[tox:travis]
19-
3.4 = py34
20-
3.5 = py35
21-
3.6 = py36
18+
[gh-actions]
19+
python =
20+
3.4: py34
21+
3.5: py35
22+
3.6.8: py36
2223

2324
[flake8]
2425
max-complexity = 5
2526
inline-quotes = single
2627
multiline-quotes = single
2728
max-line-length = 82
29+
30+
[gh-actions:env]
31+
PLATFORM =
32+
ubuntu-latest: 18.04

0 commit comments

Comments
 (0)