Update gecko #749
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
# Run basic tests on the latest aiidalab/full-stack and ispg-group/atmospec docker images. | |
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
FORCE_COLOR: 1 | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out app | |
uses: actions/checkout@v4 | |
- name: Set up Python with cache | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: pip | |
- name: Run pre-commit | |
uses: pre-commit/[email protected] | |
test-app: | |
needs: pre-commit | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
permissions: | |
packages: read | |
contents: read | |
strategy: | |
matrix: | |
tag: [latest] | |
image: ["ghcr.io/aiidalab/full-stack", "ghcr.io/ispg-group/atmospec"] | |
browser: [Firefox, Chrome] | |
fail-fast: false | |
env: | |
IMAGE: ${{ matrix.image }} | |
# Right now due to old AWB version we do not support the latest image with aiida-core=2.5.1 | |
TAG: ${{ matrix.image == 'ghcr.io/aiidalab/full-stack' && 'aiida-2.4.3' || 'latest' }} | |
steps: | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check out app | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: pip | |
cache-dependency-path: | | |
**/setup.cfg | |
**/pyproject.toml | |
**/requirements*.txt | |
- name: Install dependencies for tests | |
run: pip install -r requirements-test.txt | |
- name: Set jupyter token env | |
run: echo "JUPYTER_TOKEN=$(openssl rand -hex 32)" >> $GITHUB_ENV | |
- name: Run pytest | |
run: pytest -sv --driver ${{ matrix.browser }} -o cache_dir=$PYTEST_CACHE_DIR tests/app/ | |
- name: Replace slashes in image name | |
if: always() | |
run: echo "IMAGE_NAME=${IMAGE//\//-}" >> $GITHUB_ENV | |
- name: Upload screenshots as artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Screenshots-${{env.IMAGE_NAME}}-${{ matrix.tag }}-${{ matrix.browser }} | |
path: screenshots/ | |
if-no-files-found: error |