-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify distribution infrastructure
- Loading branch information
1 parent
e1a6d56
commit 0fe27c4
Showing
5 changed files
with
67 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -19,8 +19,9 @@ jobs: | |
with: | ||
python-version: '3.10' | ||
- uses: pre-commit/[email protected] | ||
|
||
test: | ||
name: Python | ||
name: Suite | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -39,17 +40,45 @@ 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 | ||
python3 -m 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-tests: | ||
name: Distribution | ||
runs-on: ubuntu-latest | ||
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 twine build | ||
- name: Build sdist and wheel | ||
run: | | ||
python -m build | ||
- name: Check distribution artefacts | ||
run: | | ||
python3 -m twine check dist/* | ||
- name: Install wheel | ||
run: | | ||
python3 -m pip install dist/*.whl | ||
- name: Import package | ||
# Don't import from current dir | ||
run: | | ||
cd / | ||
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 |