-
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.
- Loading branch information
1 parent
04d2839
commit d52e2c7
Showing
15 changed files
with
650 additions
and
31 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 |
---|---|---|
@@ -0,0 +1,119 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
cache: 'pip' | ||
cache-dependency-path: | | ||
**/requirements*.txt | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install -y pandoc | ||
python -m pip install --upgrade pip | ||
python -m pip install -e . | ||
python -m pip install -r ./docs/requirements.txt | ||
- name: Build docs | ||
run: | | ||
cd docs/source | ||
python -m sphinx -T -E -b html -d ../build/doctrees -D language=en . ../build/html | ||
python: | ||
name: Python | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: | | ||
**/setup.cfg | ||
**/requirements*.txt | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
pip install "pytest<8" | ||
- name: Test with pytest | ||
run: | | ||
cd tests | ||
pytest | ||
ui-test: | ||
name: Visual Regression | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' | ||
cache-dependency-path: | | ||
**/setup.cfg | ||
**/requirements*.txt | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -U jupyterlab==4.0.0 jupyter-packaging~=0.10 | ||
pip install -e . | ||
- name: Install Test Dependencies | ||
run: | | ||
jlpm --immutable | ||
npx playwright install chromium | ||
working-directory: ui-tests | ||
|
||
- name: Execute integration tests | ||
shell: bash -l {0} | ||
working-directory: ui-tests | ||
run: | | ||
npx playwright test | ||
- name: Upload Playwright Test assets | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-assets | ||
path: | | ||
ui-tests/test-results | ||
- name: Upload Playwright Test report | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-report | ||
path: | | ||
ui-tests/playwright-report | ||
- name: Update snapshots | ||
if: failure() | ||
working-directory: ui-tests | ||
run: | | ||
jlpm test:update | ||
- name: Upload updated snapshots | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: updated-snapshots | ||
path: ui-tests/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
Oops, something went wrong.