Skip to content

Commit b8d8508

Browse files
authored
Add GitHub actions (#947)
1 parent b9f0e4f commit b8d8508

File tree

5 files changed

+89
-96
lines changed

5 files changed

+89
-96
lines changed

.github/workflows/deploy.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 🚀 Deploy to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Set up Python 3.8
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.8
18+
- name: Build wheel and source tarball
19+
run: |
20+
python setup.py sdist bdist_wheel
21+
- name: Publish a Python distribution to PyPI
22+
uses: pypa/[email protected]
23+
with:
24+
user: __token__
25+
password: ${{ secrets.pypi_password }}

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Set up Python 3.8
12+
uses: actions/setup-python@v1
13+
with:
14+
python-version: 3.8
15+
- name: Install dependencies
16+
run: |
17+
python -m pip install --upgrade pip
18+
pip install tox
19+
- name: Run lint 💅
20+
run: tox
21+
env:
22+
TOXENV: flake8

.github/workflows/tests.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
max-parallel: 4
10+
matrix:
11+
django: ["1.11", "2.2", "3.0"]
12+
python-version: ["3.6", "3.7", "3.8"]
13+
include:
14+
- django: "1.11"
15+
python-version: "2.7"
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install tox tox-gh-actions
27+
- name: Test with tox
28+
run: tox
29+
env:
30+
DJANGO: ${{ matrix.django }}
31+
TOXENV: ${{ matrix.toxenv }}

.travis.yml

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

tox.ini

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ envlist =
44
py{36,37,38}-django30,
55
black,flake8
66

7-
[travis:env]
7+
[gh-actions]
8+
python =
9+
2.7: py27
10+
3.6: py36
11+
3.7: py37
12+
3.8: py38
13+
14+
[gh-actions:env]
815
DJANGO =
916
1.11: django111
1017
2.0: django20
@@ -30,13 +37,13 @@ deps =
3037
commands = {posargs:py.test --cov=graphene_django graphene_django examples}
3138

3239
[testenv:black]
33-
basepython = python3.7
40+
basepython = python3.8
3441
deps = -e.[dev]
3542
commands =
3643
black --exclude "/migrations/" graphene_django examples setup.py --check
3744

3845
[testenv:flake8]
39-
basepython = python3.7
46+
basepython = python3.8
4047
deps = -e.[dev]
4148
commands =
42-
flake8 graphene_django examples
49+
flake8 graphene_django examples setup.py

0 commit comments

Comments
 (0)