-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removed several new and old environment files to lower maintenance burden. - environment.yaml - envs/py3.10-tests.yaml - envs/py3.11-tests.yaml - envs/py3.12-tests.yaml - Removal of the environment files required updating the README.md to handle creating an environment file for the user. - We ignore the created environment.yaml file in the .gitignore file - Removed requirements.txt as all requirements are handled by the pyproject.toml file. - Updated docs to fix URL links. - Also updated comments in untested code to use correct URLs. - Refactored the test.yaml workflow. - Refactored the following to remove extraneous line character - tests/test_basic.py (also renamed the method and module to correlate with the method being tested in the module.) - src/holoseq/exceptions.py - pyproject.toml - .github/workflows/test.yaml
- Loading branch information
Showing
17 changed files
with
174 additions
and
412 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,164 +1,38 @@ | ||
name: tests | ||
name: Run tests | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+' | ||
pull_request: | ||
branches: | ||
- '*' | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: "How much of the test suite to run" | ||
type: choice | ||
default: default | ||
options: | ||
- default | ||
- full | ||
- downstream | ||
cache: | ||
description: "Use cache" | ||
type: boolean | ||
default: true | ||
schedule: | ||
- cron: '0 15 * * SUN' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
push: | ||
branches: [main] | ||
paths-ignore: | ||
- "docs/" | ||
- "notebooks/" | ||
- "scripts/" | ||
|
||
jobs: | ||
pre_commit: | ||
name: Run pre-commit | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: holoviz-dev/holoviz_tasks/[email protected] | ||
setup: | ||
name: Setup workflow | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ env.MATRIX }} | ||
matrix_option: ${{ env.MATRIX_OPTION }} | ||
steps: | ||
- name: Set matrix option | ||
run: | | ||
if [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]; then | ||
OPTION=${{ github.event.inputs.target }} | ||
elif [[ '${{ github.event_name }}' == 'schedule' ]]; then | ||
OPTION="full" | ||
elif [[ '${{ github.event_name }}' == 'push' && '${{ github.ref_type }}' == 'tag' ]]; then | ||
OPTION="full" | ||
else | ||
OPTION="default" | ||
fi | ||
echo "MATRIX_OPTION=$OPTION" >> $GITHUB_ENV | ||
- name: Set test matrix with 'default' option | ||
if: env.MATRIX_OPTION == 'default' | ||
run: | | ||
MATRIX=$(jq -nsc '{ | ||
"os": ["ubuntu-latest", "macos-latest", "windows-latest"], | ||
"python-version": ["3.10", "3.12"], | ||
"exclude": [ | ||
{ | ||
"python-version": "3.10", | ||
"os": "macos-latest" | ||
} | ||
] | ||
}') | ||
echo "MATRIX=$MATRIX" >> $GITHUB_ENV | ||
- name: Set test matrix with 'full' option | ||
if: env.MATRIX_OPTION == 'full' | ||
run: | | ||
MATRIX=$(jq -nsc '{ | ||
"os": ["ubuntu-latest", "macos-latest", "windows-latest"], | ||
"python-version": ["3.10", "3.12"], | ||
"include": [ | ||
{ | ||
"python-version": "3.10", | ||
"os": "ubuntu-latest" | ||
}, | ||
{ | ||
"python-version": "3.11", | ||
"os": "ubuntu-latest" | ||
}, | ||
, | ||
{ | ||
"python-version": "3.12", | ||
"os": "ubuntu-latest" | ||
} | ||
] | ||
}') | ||
echo "MATRIX=$MATRIX" >> $GITHUB_ENV | ||
- name: Set test matrix with 'downstream' option | ||
if: env.MATRIX_OPTION == 'downstream' | ||
run: | | ||
MATRIX=$(jq -nsc '{ | ||
"os": ["ubuntu-latest"], | ||
"python-version": ["3.12"] | ||
}') | ||
echo "MATRIX=$MATRIX" >> $GITHUB_ENV | ||
conda_suite: | ||
name: conda tests:${{ matrix.os }}:${{ matrix.python-version }} | ||
needs: [pre_commit, setup] | ||
if: needs.setup.outputs.matrix_option != 'default' | ||
runs-on: ${{ matrix.os }} | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.setup.outputs.matrix) }} | ||
timeout-minutes: 90 | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-update-conda: true | ||
environment-file: envs/py${{ matrix.python-version }}-tests.yaml | ||
activate-environment: holoseqtests | ||
- name: conda info | ||
run: conda info | ||
- name: conda list | ||
run: conda list | ||
- name: unit tests | ||
run: pytest -v holoseq --cov=holoseq --cov-append | ||
pip_test: | ||
name: pip tests:${{ matrix.os }}:${{ matrix.python-version }} | ||
needs: [pre_commit, setup] | ||
timeout-minutes: 90 | ||
matrix: | ||
os: [ubuntu-latest] | ||
version: ["3.10", "3.11", "3.12"] | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.setup.outputs.matrix) }} | ||
defaults: | ||
run: | ||
shell: bash -e {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v5 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: install with geo | ||
run: python -m pip install -v --prefer-binary -e '.[tests, examples-tests, geo, hvdev, hvdev-geo, dev-extras]' | ||
- name: python version and pip list | ||
python-version: ${{ matrix.version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python --version --version | ||
python -m pip list | ||
- name: unit tests | ||
run: pytest -v hvplot --cov=hvplot --cov-append | ||
- name: Upload coverage reports to Codecov | ||
if: github.event_name == 'push' || github.event_name == 'pull_request' | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: false | ||
verbose: false | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
python -m pip install --upgrade pip | ||
pip install .[dev,test] | ||
- name: Run ruff | ||
uses: astral-sh/ruff-action@v2 | ||
|
||
- name: Run tests | ||
run: | | ||
pytest -v tests --cov=src/holoseq --cov-append |
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
Oops, something went wrong.