Skip to content

Commit

Permalink
Merge pull request #333 from sneakers-the-rat/fix-test-upstream
Browse files Browse the repository at this point in the history
fix upstream test action
  • Loading branch information
cmungall authored Jul 26, 2024
2 parents 984e4b2 + 42181a7 commit 09b1f0c
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions .github/workflows/test-upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,17 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
pydantic-version: [ "1", "2" ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
exclude:
- os: windows-latest
python-version: "3.8"
python-version: "3.9"
- os: windows-latest
pydantic-version: "1"
- python-version: "3.8"
pydantic-version: "1"
- python-version: "3.9"
pydantic-version: "1"
- python-version: "3.10"
pydantic-version: "1"
python-version: "3.10"
- os: windows-latest
python-version: "3.11"
runs-on: ${{ matrix.os }}
env:
POETRY_VIRTUALENVS_IN_PROJECT: true

steps:

Expand All @@ -43,16 +40,23 @@ jobs:
path: linkml-runtime
fetch-depth: 0

- name: Ensure tags if not run from main repo
if: github.repository != 'linkml/linkml-runtime'
working-directory: linkml-runtime
run: |
git remote add upstream https://github.com/linkml/linkml-runtime
git fetch upstream --tags
- name: set up python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install poetry
run: pipx install poetry

- name: Install dynamic versioning plugin
run: poetry self add "poetry-dynamic-versioning[plugin]"

- name: Load cached venv
id: cached-poetry-dependencies
Expand All @@ -72,11 +76,6 @@ jobs:
working-directory: linkml
run: poetry add ../linkml-runtime

# use correct pydantic version
- name: install pydantic
working-directory: linkml
run: poetry add pydantic@^${{ matrix.pydantic-version }}

# note that we run the installation step always, even if we restore a venv,
# the cache will restore the old version of linkml-runtime, but the lockfile
# will only store the directory dependency (and thus will reinstall it)
Expand Down

0 comments on commit 09b1f0c

Please sign in to comment.