Release 0.1.9 #273
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
name: Test | |
on: [push, pull_request] | |
jobs: | |
docs: | |
name: Documentation | |
runs-on: ubuntu-22.04 | |
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-22.04 | |
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 | |
npm install | |
npm run build | |
pip install -e . | |
pip install "pytest<8" pymatgen | |
- name: Test with pytest | |
run: | | |
cd tests | |
pytest | |
ui-test: | |
name: Visual Regression | |
runs-on: ubuntu-22.04 | |
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 | |
npm install | |
npm run build | |
python -m pip install -U jupyterlab==4.1.2 jupyter-packaging~=0.12 | |
pip install -e . | |
- name: Install Test Dependencies | |
run: | | |
jlpm --immutable | |
npx playwright install chromium | |
working-directory: tests/notebooks | |
- name: Execute integration tests | |
shell: bash -l {0} | |
working-directory: tests/notebooks | |
run: | | |
npx playwright test | |
- name: Upload Playwright Test assets | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-assets | |
path: | | |
tests/notebooks/test-results | |
- name: Upload Playwright Test report | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: 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: updated-snapshots | |
path: tests/notebooks/tests |