Merge pull request #1547 from jjerphan/use-mamba-2.7.0 #1892
This file contains hidden or 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 is a GitHub workflow defining a set of jobs with a set of steps. | |
| # ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
| # | |
| name: Test | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - "docs/**" | |
| - "**.md" | |
| - "**.rst" | |
| - ".github/workflows/*" | |
| - "!.github/workflows/test.yml" | |
| - ".pre-commit-config.yaml" | |
| push: | |
| paths-ignore: | |
| - "docs/**" | |
| - "**.md" | |
| - "**.rst" | |
| - ".github/workflows/*" | |
| - "!.github/workflows/test.yml" | |
| - ".pre-commit-config.yaml" | |
| branches-ignore: | |
| - "dependabot/**" | |
| - "pre-commit-ci-update-config" | |
| tags: | |
| - "**" | |
| schedule: | |
| # Run weekly test so we know if tests break for external reasons | |
| # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#scheduled-events | |
| # | |
| # At 10:36 on Sunday (https://crontab.guru) | |
| - cron: '36 10 * * 0' | |
| workflow_dispatch: | |
| # Global environment variables | |
| env: | |
| GIT_COMMITTER_EMAIL: ci-user@github.local | |
| GIT_COMMITTER_NAME: CI User | |
| GIT_AUTHOR_EMAIL: ci-user@github.local | |
| GIT_AUTHOR_NAME: CI User | |
| jobs: | |
| test: | |
| # Don't run scheduled tests on forks | |
| if: ${{ github.repository_owner == 'jupyterhub' || github.event_name != 'schedule' }} | |
| runs-on: ubuntu-${{ matrix.ubuntu_version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ubuntu_version: ["24.04"] | |
| python_version: ["3.13"] | |
| container_cli: | |
| - docker | |
| repo_type: | |
| - base | |
| - conda | |
| - dockerfile | |
| - external | |
| - julia | |
| - nix | |
| - pipfile | |
| - r | |
| - unit | |
| - venv | |
| - contentproviders | |
| - norun | |
| # Playwright test | |
| - ui | |
| # If the item to be include would overwrite a value, | |
| # it must have all the fields! | |
| include: | |
| # The earliest actions/setup-python versions depend on the runner. | |
| - ubuntu_version: "24.04" | |
| python_version: "3.10" | |
| container_cli: docker | |
| repo_type: venv | |
| # Run all tests for both Docker and Podman is expensive. | |
| # We only run the "smoke" test for Podman. | |
| - ubuntu_version: "24.04" | |
| python_version: "3.13" | |
| container_cli: podman | |
| repo_type: base | |
| # We are observing "no space left on device" on GitHub Actions, | |
| # https://github.com/jupyterhub/repo2docker/pull/1471#issuecomment-3744990787 | |
| # - ubuntu_version: "24.04" | |
| # python_version: "3.13" | |
| # container_cli: podman | |
| # repo_type: conda | |
| - ubuntu_version: "24.04" | |
| python_version: "3.13" | |
| container_cli: podman | |
| repo_type: dockerfile | |
| - ubuntu_version: "24.04" | |
| python_version: "3.13" | |
| container_cli: podman | |
| repo_type: unit | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "${{ matrix.python_version }}" | |
| - name: Install dependencies | |
| run: | | |
| pip install -r dev-requirements.txt | |
| pip freeze | |
| - name: Install UI test dependencies | |
| if: matrix.repo_type == 'ui' | |
| run: | | |
| pip install -r playwright-requirements.txt | |
| playwright install firefox | |
| - name: Install repo2docker | |
| run: | | |
| python -m build --wheel . | |
| pip install dist/*.whl | |
| # add for mercurial tests | |
| pip install mercurial hg-evolve | |
| pip freeze | |
| - name: Run pytest | |
| run: | | |
| if [ "${{ matrix.container_cli }}" = "podman" ] | |
| then | |
| systemctl --user start podman.socket | |
| export DOCKER_HOST=unix://$(podman info --format '{{.Host.RemoteSocket.Path}}') | |
| fi | |
| pytest --verbose --color=yes --durations=10 --cov=repo2docker tests/${{ matrix.repo_type }} | |
| - uses: codecov/codecov-action@v6 |