Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Travis and GitHub Actions configuration
- Loading branch information
Showing
3 changed files
with
61 additions
and
0 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,31 @@ | ||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v1 | ||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
- name: Lint with flake8 | ||
run: | | ||
pip install flake8 | ||
find . -name "*.py" | flake8 --count --max-complexity=5 \ | ||
--show-source --statistics | ||
- name: Install and test with pytest | ||
run: | | ||
pip install pytest setuptools-scm | ||
pip install --editable . | ||
pytest --verbose | ||
- name: Test package build | ||
run: | | ||
pip install twine | ||
python3 setup.py bdist_wheel sdist | ||
twine check dist/* |
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,16 @@ | ||
os: linux | ||
dist: bionic | ||
language: python | ||
|
||
python: 3.8 | ||
|
||
install: | ||
- pip install flake8 setuptools-scm twine | ||
- pip install --editable . | ||
|
||
script: | ||
- pytest --verbose | ||
# Check code style | ||
- flake8 iam_units/*.py | ||
# Test package build | ||
- python3 setup.py bdist_wheel sdist && twine check dist/* |
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