-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from euro-hpc-pl/kj/github-actions
Add Github actions for quality checks
- Loading branch information
Showing
4 changed files
with
77 additions
and
3 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,23 @@ | ||
name: Build package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install pypa/build | ||
run: python -m pip install build --user | ||
- name: Build binary wheel and source tarball | ||
run: python -m build --sdist --wheel --outdir dist/ | ||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_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,49 @@ | ||
name: Run tests and other quality checks | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
run_tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-versions: [3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies and the package | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[test] | ||
- name: Run unit tests | ||
run: pytest --cov=omnisolver --cov-report=xml | ||
- name: Report coverage | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | ||
fail_ci_if_error: true | ||
|
||
run_quality_cheks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- uses: actions/checkout@v2 | ||
- name: Run quality checks | ||
uses: ricardochaves/python-lint@v1.4.0 | ||
with: | ||
python-root-list: "omnisolver" | ||
use-pylint: false | ||
use-pycodestyle: false | ||
use-flake8: true | ||
use-mypy: true | ||
use-black: true | ||
use-isort: true | ||
extra-flake8-options: --max-line-length=100 | ||
extra-mypy-options: --ignore-missing-imports --namespace-packages | ||
extra-isort-options: --check-only --profile black |
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