-
Notifications
You must be signed in to change notification settings - Fork 6
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
e1a6d56
commit 6b13e05
Showing
3 changed files
with
43 additions
and
25 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 |
---|---|---|
|
@@ -19,8 +19,9 @@ jobs: | |
with: | ||
python-version: '3.10' | ||
- uses: pre-commit/[email protected] | ||
|
||
test: | ||
name: Python | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -39,17 +40,43 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
pip install pytest | ||
pip install pytest-cov | ||
pip install pytest-xdist | ||
pip install -r requirements/CI-tests-pip/requirements.txt | ||
python3 -m pip install -r requirements/CI-tests-pip/requirements.txt | ||
- name: Test with pytest | ||
run: | | ||
pytest --cov=tstrait --cov-report=xml --cov-branch -n 0 tests | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Delete coverage | ||
run: | | ||
rm .coverage | ||
rm .coverage | ||
dist: | ||
name: Distribution | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install build twine | ||
- name: Build sdist and wheel | ||
python -m build | ||
- name: Check distribution artefacts | ||
python3 -m twine check dist/* | ||
- name: Install wheel and import package | ||
run: | | ||
python3 -m pip install dist/*.whl | ||
python3 -c "import tstrait" |
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 |
---|---|---|
|
@@ -3,4 +3,7 @@ numba | |
numpy | ||
pandas | ||
scipy | ||
tskit>=0.5.5 | ||
tskit>=0.5.5 | ||
pytest | ||
pytest-cov | ||
pytest-xdist |