Skip to content

Commit e65ae32

Browse files
authored
Merge pull request #18 from SVilgelm/github-actions
Using GitHub Actions instead of Travis CI
2 parents b613f08 + 7ab92eb commit e65ae32

File tree

7 files changed

+98
-101
lines changed

7 files changed

+98
-101
lines changed

.github/workflows/release.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- "*"
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Set up Python 3.8
11+
uses: actions/setup-python@v1
12+
with:
13+
python-version: 3.8
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install ".[dev]" wheel
20+
- name: Fetch web assets
21+
run: inv assets
22+
- name: Publish
23+
env:
24+
TWINE_USERNAME: "__token__"
25+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26+
run: |
27+
python setup.py sdist bdist_wheel
28+
twine upload dist/*

.github/workflows/test.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Tests
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy2, pypy3]
11+
steps:
12+
- name: Set up Python ${{ matrix.python-version }}
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: ${{ matrix.python-version }}
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install ".[dev]"
22+
- name: Test with inv
23+
run: inv cover qa
24+
- name: Coveralls
25+
run: |
26+
pip install coveralls
27+
coveralls --rcfile=coverage.rc
28+
env:
29+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
30+
bench:
31+
needs: test
32+
runs-on: ubuntu-latest
33+
if: github.event_name == 'pull_request'
34+
steps:
35+
- name: Set up Python 3.8
36+
uses: actions/setup-python@v1
37+
with:
38+
python-version: 3.8
39+
- name: Checkout ${{ github.base_ref }}
40+
uses: actions/checkout@v2
41+
with:
42+
ref: ${{ github.base_ref}}
43+
path: base
44+
- name: Checkout ${{ github.ref }}
45+
uses: actions/checkout@v2
46+
with:
47+
ref: ${{ github.ref}}
48+
path: ref
49+
- name: Install dev dependencies
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install -e "base[dev]"
53+
- name: Install ci dependencies for ${{ github.base_ref }}
54+
run: pip install -e "base[ci]"
55+
- name: Benchmarks for ${{ github.base_ref }}
56+
run: |
57+
cd base
58+
inv benchmark --max-time 4 --save
59+
mv .benchmarks ../ref/
60+
- name: Install ci dependencies for ${{ github.ref }}
61+
run: pip install -e "ref[ci]"
62+
- name: Benchmarks for ${{ github.ref }}
63+
run: |
64+
cd ref
65+
inv benchmark --max-time 4 --compare

.travis.yml

-33
This file was deleted.

CONTRIBUTING.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Release process
110110
---------------
111111

112112
The new releases are pushed on `Pypi.org <https://pypi.org/>`_ automatically
113-
from `travis-ci <https://travis-ci.org/>`_ when we add a new tag (unless the
113+
from `GitHub Actions <https://github.com/python-restx/flask-restx/actions?query=workflow%3ARelease>`_ when we add a new tag (unless the
114114
tests are failing).
115115

116116
Updating Copyright

README.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Flask RESTX
33
===========
44

5-
.. image:: https://secure.travis-ci.org/python-restx/flask-restx.svg?branch=master
6-
:target: https://travis-ci.org/python-restx/flask-restx?branch=master
7-
:alt: Build status
5+
.. image:: https://github.com/python-restx/flask-restx/workflows/Tests/badge.svg?branch=master&event=push
6+
:target: https://github.com/python-restx/flask-restx/actions?query=workflow%3ATests
7+
:alt: Tests status
88
.. image:: https://coveralls.io/repos/github/python-restx/flask-restx/badge.svg?branch=master
99
:target: https://coveralls.io/github/python-restx/flask-restx?branch=master
1010
:alt: Code coverage

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ def pip(filename):
9797
'Programming Language :: Python :: 2',
9898
'Programming Language :: Python :: 2.7',
9999
'Programming Language :: Python :: 3',
100-
'Programming Language :: Python :: 3.4',
101100
'Programming Language :: Python :: 3.5',
102101
'Programming Language :: Python :: 3.6',
103102
'Programming Language :: Python :: 3.7',
103+
'Programming Language :: Python :: 3.8',
104104
'Programming Language :: Python :: Implementation :: PyPy',
105105
'Topic :: Software Development :: Libraries :: Python Modules',
106106
'License :: OSI Approved :: BSD License',

travis-bench-after-success.sh

-63
This file was deleted.

0 commit comments

Comments
 (0)