25
25
26
26
steps :
27
27
28
- - name : checkout upstream
28
+ - name : checkout upstream linkml
29
29
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
30
30
with :
31
31
repository : linkml/linkml
@@ -36,24 +36,17 @@ jobs:
36
36
- name : checkout linkml-runtime
37
37
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
38
38
with :
39
- # don't specify repository like this or else we won't get pull request branches correctly
40
- # repository: linkml/linkml-runtime
41
39
path : linkml-runtime
42
40
fetch-depth : 0
43
41
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
+
57
50
- name : set up python
58
51
uses : actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
59
52
with :
@@ -76,37 +69,21 @@ jobs:
76
69
path : linkml/.venv
77
70
key : venv-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
78
71
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
88
76
working-directory : linkml
89
77
run : |
90
78
git tag --list "v1.8.*"
91
79
poetry sync --extras tests
92
80
poetry add ../linkml-runtime
93
81
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
-
105
82
- name : print linkml-runtime version
106
83
working-directory : linkml
107
84
run : poetry run python -c 'import linkml_runtime; from importlib.metadata import version; print(linkml_runtime.__file__); print(version("linkml_runtime"))'
108
85
109
- - name : run tests
86
+ - name : run linkml tests
110
87
shell : bash
111
88
working-directory : linkml
112
89
run : poetry run python -m pytest --with-slow
0 commit comments