diff --git a/.github/workflows/test-upstream.yaml b/.github/workflows/test-upstream.yaml index c009610f..eb07758c 100644 --- a/.github/workflows/test-upstream.yaml +++ b/.github/workflows/test-upstream.yaml @@ -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: @@ -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 @@ -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)