-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (28 loc) · 1.25 KB
/
run-tests.yml
File metadata and controls
30 lines (28 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# GitHub Actions workflow that runs tests.
# Reference: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
name: Run tests
on:
pull_request: { branches: [ main ] }
push: { branches: [ main ] }
workflow_dispatch: { }
# Allow this workflow to be called by other workflows.
# Reference: https://docs.github.com/en/actions/using-workflows/reusing-workflows
workflow_call: { }
jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
permissions: { contents: read }
steps:
- name: Check out commit # Docs: https://github.com/actions/checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
# Note: Caching (of the packages that `uv` builds while resolving dependencies) is "enabled by default on GitHub-hosted runners."
# Reference: https://github.com/astral-sh/setup-uv/blob/main/README.md#enable-caching
# Here, we make it so the cache gets invalidated whenever the `uv.lock` file changes.
# Reference: https://github.com/astral-sh/setup-uv/blob/main/README.md#cache-dependency-glob
cache-dependency-glob: "uv.lock"
- name: Run tests
run: uv run pytest -vv --color=yes