-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70c9c29
commit ee76c60
Showing
3 changed files
with
44 additions
and
12 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[run] | ||
concurrency = multiprocessing | ||
concurrency = multiprocessing |
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 |
---|---|---|
|
@@ -10,8 +10,20 @@ on: | |
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
cache: pip | ||
cache-dependency-path: pyproject.toml | ||
|
||
- uses: pre-commit/[email protected] | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
@@ -31,12 +43,12 @@ jobs: | |
python -m pip install flake8 pytest pytest-mock pytest-split pytest-cov pytestify | ||
python -m pip install types-setuptools | ||
pip install .[featurizer] | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
# - name: Lint with flake8 | ||
# run: | | ||
# # stop the build if there are Python syntax errors or undefined names | ||
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest and coverage | ||
# run this locally to update tests durations | ||
# pytest --cov=lobsterpy --cov-append --splits 1 --group 1 --durations-path ./tests/test_data/.pytest-split-durations --store-durations | ||
|
@@ -49,7 +61,7 @@ jobs: | |
path: .coverage | ||
|
||
coverage: | ||
needs: build | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -68,3 +80,23 @@ jobs: | |
run: | | ||
coverage combine coverage*/.coverage* | ||
coverage report --show-missing | ||
docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: pip | ||
cache-dependency-path: pyproject.toml | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[docs, featurizer] | ||
- name: Build | ||
run: sphinx-build docs/source docs_build |