-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub actions for testing (#108)
Replaces TravisCI and restores working CI.
- Loading branch information
1 parent
0312bc4
commit a781b46
Showing
9 changed files
with
172 additions
and
65 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ exclude_lines = | |
if __name__ == .__main__.: | ||
ignore_errors = True | ||
omit = | ||
tests/* | ||
tests/* | ||
docs/* |
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,156 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest] | ||
python-version: [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 setuptools wheel | ||
shell: bash | ||
|
||
- name: Linter | ||
run: | | ||
python -m pip install flake8 | ||
flake8 . | ||
build_and_test_linux: | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest] | ||
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 setuptools wheel bump2version twine | ||
shell: bash | ||
|
||
- name: Linter | ||
run: | | ||
python -m pip install flake8 | ||
flake8 . | ||
- name: Build | ||
run: | | ||
python --version | ||
python setup.py sdist bdist_wheel | ||
twine check dist/*.whl | ||
twine check dist/*.tar.gz | ||
bump2version --dry-run --verbose --allow-dirty patch | ||
bump2version --dry-run --verbose --allow-dirty minor | ||
bump2version --dry-run --verbose --allow-dirty major | ||
- name: Test | ||
run: | | ||
python -m pip install . | ||
script -q -e -c "python setup.py test" | ||
test_macos: | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
platform: [macos-latest] | ||
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 setuptools wheel | ||
brew install expect | ||
shell: bash | ||
|
||
- name: Test Linux/MacOS | ||
run: | | ||
python -m pip install . | ||
unbuffer python setup.py test | ||
# test_windows: | ||
# runs-on: ${{ matrix.platform }} | ||
# strategy: | ||
# matrix: | ||
# platform: [windows-latest] | ||
# 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 setuptools wheel | ||
|
||
# - name: Test Windows | ||
# run: | | ||
# python -m pip install . | ||
# Invoke-Expression 'python setup.py test' | ||
|
||
coverage: | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest] | ||
python-version: [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 setuptools wheel | ||
python -m pip install coverage | ||
- name: Get Coverage | ||
run: | | ||
python -m pip install . | ||
script -q -e -c "coverage run setup.py test" | ||
# from https://about.codecov.io/blog/ | ||
# python-code-coverage-using-github-actions-and-codecov/ | ||
- name: Upload Coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
fail_ci_if_error: true | ||
verbose: true |
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 |
---|---|---|
|
@@ -121,4 +121,4 @@ | |
'pdb_uniqname', | ||
'pdb_validate', | ||
'pdb_wc', | ||
] | ||
] |
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
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