-
Notifications
You must be signed in to change notification settings - Fork 25
63 lines (51 loc) · 1.87 KB
/
check-pull-request.yaml
File metadata and controls
63 lines (51 loc) · 1.87 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# see https://github.com/linkml/schemasheets/blob/main/.github/workflows/main.yaml
name: Check Pull Request
# Controls when the action will run.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
runs-on: ${{ matrix.os }}
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# install uv
#----------------------------------------------
- name: Install uv
uses: astral-sh/setup-uv@v6
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-uv-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/uv.lock') }}
#----------------------------------------------
# install dependencies
#----------------------------------------------
- name: Install dependencies
run: uv sync
- name: Run test suite
run: uv run pytest tests/
- name: Check project dependencies
run: make check-dependencies