Skip to content

Commit 77b9832

Browse files
committed
Add GitHub actions (#947)
1 parent 82d8dbc commit 77b9832

File tree

5 files changed

+83
-70
lines changed

5 files changed

+83
-70
lines changed

.github/workflows/deploy.yml

+25
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

+22
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

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install tox tox-gh-actions
24+
- name: Test with tox
25+
run: tox
26+
env:
27+
DJANGO: ${{ matrix.django }}
28+
TOXENV: ${{ matrix.toxenv }}

.travis.yml

-68
This file was deleted.

tox.ini

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ envlist =
33
py{36,37,38}-django{111,22,30,master},
44
black,flake8
55

6-
[travis:env]
6+
[gh-actions]
7+
python =
8+
3.6: py36
9+
3.7: py37
10+
3.8: py38
11+
12+
[gh-actions:env]
713
DJANGO =
814
1.11: django111
915
2.2: django22
@@ -34,4 +40,4 @@ commands =
3440
basepython = python3.8
3541
deps = -e.[dev]
3642
commands =
37-
flake8 graphene_django examples
43+
flake8 graphene_django examples setup.py

0 commit comments

Comments
 (0)