Skip to content

Centralized notebook for managing AiiDA codes #647

Centralized notebook for managing AiiDA codes

Centralized notebook for managing AiiDA codes #647

Workflow file for this run

---
# Run basic tests for this app on the latest aiidalab-docker image.
name: continuous-integration
on:
push:
branches:
- main
pull_request:
env:
FORCE_COLOR: '1'
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-notebooks:
strategy:
matrix:
browser: [Chrome, Firefox]
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out app
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup uv
uses: astral-sh/setup-uv@v4
with:
version: 0.4.20
- name: Install package test dependencies
# Notebook tests happen in the container, here we only need to install
# the pytest-docker dependency. Unfortunately, uv/pip does not allow to
# only install [dev] dependencies so we end up installing all the rest as well.
run: uv pip install --system .[dev]
- name: Set jupyter token env
run: echo "JUPYTER_TOKEN=$(openssl rand -hex 32)" >> $GITHUB_ENV
- name: Run pytest
run: pytest -v --driver ${{ matrix.browser }} tests_notebooks/
env:
TAG: edge
- name: Upload screenshots as artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: Screenshots-${{ matrix.browser }}
path: screenshots/
if-no-files-found: error