Skip to content

Commit c26b982

Browse files
committed
Cleaned-up of test-upstream action
1 parent 97402b8 commit c26b982

File tree

1 file changed

+14
-37
lines changed

1 file changed

+14
-37
lines changed

.github/workflows/test-upstream.yaml

+14-37
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727

28-
- name: checkout upstream
28+
- name: checkout upstream linkml
2929
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
3030
with:
3131
repository: linkml/linkml
@@ -36,24 +36,17 @@ jobs:
3636
- name: checkout linkml-runtime
3737
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
3838
with:
39-
# don't specify repository like this or else we won't get pull request branches correctly
40-
# repository: linkml/linkml-runtime
4139
path: linkml-runtime
4240
fetch-depth: 0
4341

44-
# - name: Ensure tags if not run from main repo
45-
# if: github.repository != 'linkml/linkml-runtime'
46-
# working-directory: linkml-runtime
47-
# run: |
48-
# git remote add upstream https://github.com/linkml/linkml-runtime
49-
# git fetch upstream --tags
50-
51-
# - name: Ensure tags if not run from main repo
52-
# working-directory: linkml
53-
# run: |
54-
# git remote add upstream https://github.com/linkml/linkml
55-
# git fetch upstream --tags
56-
42+
- name: Ensure linkml-runtime tags if not run from main repo
43+
if: github.repository != 'linkml/linkml-runtime'
44+
working-directory: linkml-runtime
45+
run: |
46+
git remote add upstream https://github.com/linkml/linkml-runtime
47+
git fetch upstream --tags
48+
git tag --list "v1.8.*"
49+
5750
- name: set up python
5851
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
5952
with:
@@ -76,37 +69,21 @@ jobs:
7669
path: linkml/.venv
7770
key: venv-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
7871

79-
# make extra sure we're removing any old stuff of linkml-runtime that exists in the cache
80-
- name: Check if tags are present for poetry-dynamic-versioning plugin
81-
working-directory: linkml-runtime
82-
run: |
83-
git tag --list "v1.8.*"
84-
85-
# we are not using linkml-runtime's lockfile, but simulating what will happen
86-
# when we merge this and update linkml's lockfile
87-
- name: Refresh or install linkml; then add linkml-runtime as check for incompatible dependencies
72+
# We are not using linkml-runtime's lockfile, but simulate what will happen
73+
# when we merge this and update linkml's lockfile.
74+
# By using poetry sync we remove any old stuff that exists in the cache.
75+
- name: Refresh or install linkml & add linkml-runtime to check dependencies
8876
working-directory: linkml
8977
run: |
9078
git tag --list "v1.8.*"
9179
poetry sync --extras tests
9280
poetry add ../linkml-runtime
9381
94-
# note that we run the installation step always, even if we restore a venv,
95-
# the cache will restore the old version of linkml-runtime, but the lockfile
96-
# will only store the directory dependency (and thus will reinstall it)
97-
# the cache will still speedup the rest of the installation
98-
#
99-
# poetry sync and poetry add to everything above, or not?
100-
#
101-
# - name: install linkml
102-
# working-directory: linkml
103-
# run: poetry install --no-interaction -E tests
104-
10582
- name: print linkml-runtime version
10683
working-directory: linkml
10784
run: poetry run python -c 'import linkml_runtime; from importlib.metadata import version; print(linkml_runtime.__file__); print(version("linkml_runtime"))'
10885

109-
- name: run tests
86+
- name: run linkml tests
11087
shell: bash
11188
working-directory: linkml
11289
run: poetry run python -m pytest --with-slow

0 commit comments

Comments
 (0)