mirror of
https://github.com/p2p-ld/numpydantic.git
synced 2024-11-14 10:44:28 +00:00
add linkml numpydantic tests
This commit is contained in:
parent
81e8854e4c
commit
f376836e28
1 changed files with 61 additions and 0 deletions
61
.github/workflows/tests-linkml.yml
vendored
Normal file
61
.github/workflows/tests-linkml.yml
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
name: LinkML Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test-linkml:
|
||||
strategy:
|
||||
matrix:
|
||||
platform: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
||||
python-version: ["3.9", "3.12"]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
steps:
|
||||
- name: Checkout LinkML
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: linkml/linkml
|
||||
path: linkml
|
||||
ref: main
|
||||
fetch-depth: 0
|
||||
- name: Checkout numpydantic
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: numpydantic
|
||||
|
||||
- name: Install poetry
|
||||
run: pipx install poetry
|
||||
|
||||
- name: Install dynamic versioning plugin
|
||||
run: poetry self add "poetry-dynamic-versioning[plugin]"
|
||||
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: poetry
|
||||
cache-dependency-path: |
|
||||
linkml/poetry.lock
|
||||
|
||||
- name: Add checked out numpydantic to poetry deps
|
||||
working-directory: linkml
|
||||
run: poetry add '../numpydantic' --python='>=3.9'
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: linkml
|
||||
run: poetry install --no-interaction -E tests
|
||||
|
||||
- name: print numpydantic version and path
|
||||
working-directory: linkml
|
||||
run: poetry run python -c 'import numpydantic; from importlib.metadata import version; print(numpydantic.__file__); print(version("numpydantic"))'
|
||||
|
||||
- name: Run LinkML Numpydantic Tests
|
||||
run: poetry run python -m pytest -m pydanticgen_npd
|
||||
working-directory: linkml
|
Loading…
Reference in a new issue