Bump actions/cache from 3 to 4 #13
Workflow file for this run
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 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: Tests | |
on: | |
pull_request: | |
paths-ignore: | |
- "docs/**" | |
- "**.md" | |
- ".github/workflows/*.yaml" | |
- "!.github/workflows/test.yaml" | |
push: | |
paths-ignore: | |
- "docs/**" | |
- "**.md" | |
- ".github/workflows/*.yaml" | |
- "!.github/workflows/test.yaml" | |
branches-ignore: | |
- "dependabot/**" | |
- "pre-commit-ci-update-config" | |
tags: ["**"] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- python-version: "3.8" | |
pip-install-spec: "jupyterhub==2.* sqlalchemy==1.*" | |
- python-version: "3.9" | |
pip-install-spec: "jupyterhub==3.*" | |
- python-version: "3.11" | |
pip-install-spec: "jupyterhub==4.*" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Install Node dependencies | |
run: | | |
npm install -g configurable-http-proxy | |
# preserve pip cache to speed up installation | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements | |
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} | |
- name: Install Python dependencies | |
run: | | |
pip install --upgrade pip | |
pip install ${{ matrix.pip-install-spec }} | |
pip install -e ".[test]" | |
- name: List Python dependencies | |
run: | | |
pip freeze | |
- name: Run tests | |
run: | | |
pytest | |
# GitHub action reference: https://github.com/codecov/codecov-action | |
- uses: codecov/codecov-action@v3 |