-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move from travis to github actions #316
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
474172d
move from travis to github actions
mvanlonden a8466ae
add flake8 to tox
mvanlonden 47e9b27
add flake8 as env in tox
mvanlonden 3d8f6d5
add flake8 to setup
mvanlonden e1caa37
remove sqlalchemy 1.1 in tests
mvanlonden d5e17f2
fix flake8 exclude
mvanlonden edf9012
move coveralls to github action
mvanlonden dcce5db
fix coverall github action config
mvanlonden a95fc42
move coveralls to tox
mvanlonden fdb88f6
move coveralls dep to test list
mvanlonden 5462fdc
add coverage command
mvanlonden 3d7e029
move coveralls back into github action
mvanlonden 19c63ff
modify coverage output
mvanlonden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These can probably be removed since they're not being tested against.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will follow up with coverage fix and removing these tests