-
Notifications
You must be signed in to change notification settings - Fork 27
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
Showing
18 changed files
with
4,706 additions
and
442 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
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,32 +19,20 @@ concurrency: | |
jobs: | ||
tests: | ||
name: ${{ matrix.label }} | ||
runs-on: ${{ matrix.os }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- label: CI-old | ||
os: ubuntu-latest | ||
python-version: 3.8 | ||
extra_dependencies: "rdkit==2020.03.1 boost-cpp=1.72.0=h359cf19_6" | ||
- label: CI-edge | ||
os: ubuntu-latest | ||
python-version: "3.10" | ||
extra_dependencies: "rdkit" | ||
- label: CI-py3.9-rdkit2022 | ||
os: ubuntu-latest | ||
python-version: 3.9 | ||
extra_dependencies: "rdkit==2022.03.1" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- name: Install Firefox | ||
uses: browser-actions/setup-firefox@latest | ||
|
||
|
@@ -64,14 +52,26 @@ jobs: | |
with: | ||
path: ~/conda_pkgs_dir | ||
key: | ||
conda-${{ hashFiles('environment.yml') }}-${{ matrix.label }}-${{ env.CACHE_NUMBER }} | ||
conda-${{ hashFiles('tests/environment.yml') }}-${{ matrix.label }}-${{ env.CACHE_NUMBER }} | ||
|
||
- name: Cache pip | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ hashFiles('setup.cfg') }} | ||
key: pip-${{ hashFiles('pyproject.toml') }} | ||
restore-keys: pip- | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache yarn | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
yarn- | ||
- name: Setup Conda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
|
@@ -93,13 +93,15 @@ jobs: | |
- name: Install remaining conda dependencies | ||
run: | | ||
mamba install ${{ matrix.extra_dependencies }} | ||
mamba install ipywidgets=8 ${{ matrix.extra_dependencies }} | ||
mamba list | ||
- name: Install package through pip | ||
- name: Build and install package | ||
run: | | ||
pip install .[tests,build] | ||
jupyter labextension develop . --overwrite | ||
pip list | ||
jupyter labextension list | ||
- name: Run tests | ||
run: | | ||
|
@@ -143,3 +145,107 @@ jobs: | |
run: | | ||
pip install dist/mols2grid-*.whl | ||
python test_install.py | ||
notebook-tests: | ||
name: ${{ matrix.label }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- label: JLab-3-Widgets-7 | ||
extra_dependencies: "jupyterlab>=3.2 ipywidgets=7" | ||
- label: JLab-4-Widgets-8 | ||
extra_dependencies: "jupyterlab=4 ipywidgets=8" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Cache conda | ||
uses: actions/cache@v3 | ||
env: | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: | ||
conda-${{ hashFiles('tests/environment.yml') }}-${{ matrix.label }}-${{ env.CACHE_NUMBER }} | ||
|
||
- name: Cache pip | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ hashFiles('pyproject.toml') }} | ||
restore-keys: pip- | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-ui-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache yarn | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-ui-cache-dir-path.outputs.dir }} | ||
key: yarn-ui-${{ hashFiles('tests/notebooks/yarn.lock') }} | ||
restore-keys: | | ||
yarn-ui- | ||
- name: Setup Conda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: "3.10" | ||
environment-file: tests/environment.yml | ||
use-only-tar-bz2: true | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
use-mamba: true | ||
|
||
- name: Install remaining conda dependencies | ||
run: | | ||
mamba install rdkit jupyter-packaging~=0.10 ${{ matrix.extra_dependencies }} | ||
mamba list | ||
- name: Build the extension | ||
run: | | ||
pip install -e .[build] | ||
jupyter labextension develop . --overwrite | ||
jupyter labextension list | ||
- name: Install Test Dependencies | ||
run: | | ||
jlpm install --no-immutable | ||
jlpm install [email protected] | ||
npx playwright install chromium | ||
working-directory: tests/notebooks | ||
|
||
- name: Execute integration tests | ||
working-directory: tests/notebooks | ||
run: | | ||
npx playwright test | ||
- name: Upload Playwright Test assets | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: notebooks-test-assets | ||
path: | | ||
tests/notebooks/test-results | ||
- name: Upload Playwright Test report | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: notebooks-test-report | ||
path: | | ||
tests/notebooks/playwright-report | ||
- name: Update snapshots | ||
if: failure() | ||
working-directory: tests/notebooks | ||
run: | | ||
jlpm test:update | ||
- name: Upload updated snapshots | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: notebook-updated-snapshots | ||
path: tests/notebooks/tests |
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
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 +1 @@ | ||
__version__ = "2.0.1-a2" | ||
__version__ = "2.0.1" |
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.