-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move from travis to github actions (#316)
* move from travis to github actions * add flake8 to tox * add flake8 as env in tox * add flake8 to setup * remove sqlalchemy 1.1 in tests * fix flake8 exclude * move coveralls to github action * fix coverall github action config * move coveralls to tox * move coveralls dep to test list * add coverage command * move coveralls back into github action * modify coverage output
- Loading branch information
1 parent
20ecaea
commit cba727c
Showing
6 changed files
with
111 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 🚀 Deploy to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Build wheel and source tarball | ||
run: | | ||
pip install wheel | ||
python setup.py sdist bdist_wheel | ||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@v1.1.0 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Run lint 💅 | ||
run: tox | ||
env: | ||
TOXENV: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 10 | ||
matrix: | ||
sql-alchemy: ["1.2", "1.3"] | ||
python-version: ["3.6", "3.7", "3.8", "3.9"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox | ||
env: | ||
SQLALCHEMY: ${{ matrix.sql-alchemy }} | ||
TOXENV: ${{ matrix.toxenv }} | ||
- name: Upload coverage.xml | ||
if: ${{ matrix.sql-alchemy == '1.3' && matrix.python-version == '3.9' }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: graphene-sqlalchemy-coverage | ||
path: coverage.xml | ||
if-no-files-found: error | ||
- name: Upload coverage.xml to codecov | ||
if: ${{ matrix.sql-alchemy == '1.3' && matrix.python-version == '3.9' }} | ||
uses: codecov/codecov-action@v1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
[tox] | ||
envlist = pre-commit,py{27,35,36,37}-sql{11,12,13} | ||
envlist = pre-commit,py{27,35,36,37,38,39}-sql{12,13},flake8 | ||
skipsdist = true | ||
minversion = 3.7.0 | ||
|
||
[gh-actions] | ||
python = | ||
2.7: py27 | ||
3.5: py35 | ||
3.6: py36 | ||
3.7: py37 | ||
3.8: py38 | ||
3.9: py39 | ||
|
||
[gh-actions:env] | ||
SQLALCHEMY = | ||
1.2: sql12 | ||
1.3: sql13 | ||
|
||
[testenv] | ||
passenv = GITHUB_* | ||
deps = | ||
.[test] | ||
sql11: sqlalchemy>=1.1,<1.2 | ||
sql12: sqlalchemy>=1.2,<1.3 | ||
sql13: sqlalchemy>=1.3,<1.4 | ||
commands = | ||
pytest graphene_sqlalchemy --cov=graphene_sqlalchemy {posargs} | ||
pytest graphene_sqlalchemy --cov=graphene_sqlalchemy --cov-report=term --cov-report=xml {posargs} | ||
|
||
[testenv:pre-commit] | ||
basepython=python3.7 | ||
basepython=python3.9 | ||
deps = | ||
.[dev] | ||
commands = | ||
pre-commit {posargs:run --all-files} | ||
|
||
[testenv:flake8] | ||
basepython = python3.9 | ||
deps = -e.[dev] | ||
commands = | ||
flake8 --exclude setup.py,docs,examples,tests,.tox --max-line-length 120 |