forked from nfdi4cat/CoreMeta4Cat
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (67 loc) · 2.4 KB
/
Copy pathmain.yaml
File metadata and controls
83 lines (67 loc) · 2.4 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Built from:
# https://docs.github.com/en/actions/guides/building-and-testing-python
---
name: Build and test
on: # yamllint disable-line rule:truthy
push:
branches: [main]
pull_request:
# Inbox-only PRs are handled exclusively by excel_inbox.yaml.
# This workflow fires after the excel_inbox bot-commit (which removes the
# inbox file and adds schema changes), so the test matrix runs on the
# correct, already-validated schema — satisfying branch-protection checks.
paths-ignore:
- "inbox/**"
env:
FORCE_COLOR: "1" # Make tools pretty.
permissions: {}
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read # needed alongside actions/upload-artifact below
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
fail-fast: false
steps:
# https://github.com/actions/checkout
- name: Check out repository
uses: actions/checkout@v7.0.0
with:
persist-credentials: false
# https://github.com/astral-sh/setup-uv
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"
# https://github.com/actions/setup-python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Install just
run: |
uv tool install rust-just
- name: Install project
run: uv sync --dev
- name: Regenerate Excel vocabulary from schema
# Keeps docs/assets/coremeta4cat_vocabulary.xlsx up to date
# before any documentation build step uses it.
run: just schema-to-excel
- name: Run test suite
run: just test
# examples/output/ (json + yaml + ttl) is generated by `just test`
# (linkml-run-examples) and is tracked in the repo -- archive it from
# one matrix leg too, so a specific run's output is inspectable as a
# build artifact without needing a local checkout or waiting on the
# next commit.
- name: Upload example validation output
if: matrix.python-version == '3.13'
uses: actions/upload-artifact@v7
with:
name: example-outputs
path: examples/output/
retention-days: 30