-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from p2p-ld/tests-linkml
[tests] Test against linkml numpydantic generator
- Loading branch information
Showing
8 changed files
with
597 additions
and
425 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
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' --editable | ||
|
||
- name: Install dependencies | ||
working-directory: linkml | ||
run: poetry install --no-interaction -E tests | ||
|
||
- name: Force uninstall and reinstall | ||
working-directory: linkml | ||
run: | | ||
poetry run pip uninstall -y numpydantic | ||
poetry run pip install -e ../numpydantic | ||
- 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 |
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 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 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
Oops, something went wrong.