-
Notifications
You must be signed in to change notification settings - Fork 28
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 #314 from naik-aakash/ci_updates
CI Updates
- Loading branch information
Showing
5 changed files
with
46 additions
and
15 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 |
---|---|---|
|
@@ -25,29 +25,43 @@ jobs: | |
|
||
test: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
split: [1, 2, 3, 4, 5, 6] | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up micromamba | ||
uses: mamba-org/setup-micromamba@main | ||
|
||
- name: Create mamba environment | ||
run: | | ||
micromamba create -n lobpy python=${{ matrix.python-version }} --yes | ||
- name: Install uv | ||
run: micromamba run -n lobpy pip install uv | ||
|
||
- name: Install LobsterPy and dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest pytest-mock pytest-split pytest-cov | ||
python -m pip install types-setuptools | ||
pip install .[featurizer] | ||
micromamba activate lobpy | ||
uv pip install --upgrade pip | ||
uv pip install --editable '.[tests,featurizer]' | ||
- 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 | ||
run: | | ||
micromamba activate lobpy | ||
pytest --cov=lobsterpy --cov-report term-missing --cov-append --splits 6 --group ${{ matrix.split }} -vv --durations-path ./tests/test_data/.pytest-split-durations | ||
- name: Upload coverage | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -58,22 +72,26 @@ jobs: | |
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install Coverage | ||
run: | | ||
python -m pip install coverage[toml] | ||
- name: Download coverage artifacts | ||
continue-on-error: true | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: Run coverage | ||
continue-on-error: true | ||
run: | | ||
coverage combine coverage*/.coverage* | ||
coverage report --show-missing | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
|
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
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