Skip to content

Commit e8f716f

Browse files
committed
Minimal changes to support windows
# Conflicts: # .github/workflows/main.yaml
1 parent 9c49cbe commit e8f716f

File tree

3 files changed

+19
-27
lines changed

3 files changed

+19
-27
lines changed

.github/workflows/main.yaml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,42 @@
55
name: Build and test linkml-model
66

77
on:
8+
push:
9+
branches: [ main ]
810
pull_request:
9-
branches: [main]
10-
types: [opened, synchronize, reopened]
11+
workflow_dispatch:
1112

1213
jobs:
1314
test:
14-
runs-on: ubuntu-latest
15-
1615
strategy:
16+
fail-fast: false
1717
matrix:
18+
os: [ubuntu-latest, windows-latest]
1819
python-version: ["3.9", "3.10"]
1920

21+
runs-on: ${{ matrix.os }}
22+
2023
steps:
21-
#----------------------------------------------
22-
# check-out repo and set-up python
23-
#----------------------------------------------
24+
2425
- name: Check out repository
25-
uses: actions/checkout@v4.2.2
26+
uses: actions/checkout@v3
2627
with:
2728
fetch-depth: 0
2829

29-
#----------------------------------------------
30-
# install & configure poetry
31-
#----------------------------------------------
32-
- name: Install Poetry
33-
run: |
34-
pipx install poetry
35-
pipx inject poetry poetry-dynamic-versioning
36-
3730
- name: Set up Python ${{ matrix.python-version }}
3831
uses: actions/[email protected]
3932
with:
4033
python-version: ${{ matrix.python-version }}
4134
cache: "poetry"
4235

43-
#----------------------------------------------
44-
# install dependencies
45-
#----------------------------------------------
36+
- name: Install Poetry
37+
run: |
38+
pipx install poetry
39+
pipx inject poetry poetry-dynamic-versioning
40+
4641
- name: Install dependencies
47-
run: poetry install --no-interaction --all-extras --no-root
42+
run: poetry install --no-interaction --no-root
4843

49-
#----------------------------------------------
50-
# run test suite
51-
#----------------------------------------------
5244
- name: Run tests
5345
run: make test
46+

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ yamllint = "^1.32.0"
4343
mkdocs = "^1.4.2"
4444
mkdocs-material = "^8.2.8"
4545
mkdocs-mermaid2-plugin = "^0.6.0"
46-
# Using an unpublished version here because we need a feature which isn't released yet (Aug 2023)
47-
# See: https://github.com/jimporter/mike/issues/154
48-
mike = {git = "https://github.com/jimporter/mike.git", rev = "be1aafe"}
46+
mike = "^2.0.0"
4947

5048
[build-system]
5149
requires = ["poetry-core>=1.0.0"]

tests/test_linkml_files.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from linkml_model.linkml_files import URL_FOR, Format, Source, LOCAL_PATH_FOR, GITHUB_IO_PATH_FOR, GITHUB_PATH_FOR, \
77
ReleaseTag
88
from tests import abspath
9+
from pathlib import Path
910

1011
root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "linkml_model"))
1112

@@ -55,7 +56,7 @@ def test_shorthand_paths(self):
5556
self.assertEqual('meta', str(fileloc.meta))
5657
self.assertEqual('meta.yaml', str(fileloc.meta.yaml))
5758
self.assertEqual('meta.py', str(fileloc.meta.python))
58-
self.assertEqual(abspath('linkml_model/model/schema/meta.yaml'), str(fileloc.meta.yaml.file))
59+
self.assertEqual(Path(abspath('linkml_model/model/schema/meta.yaml')), Path(fileloc.meta.yaml.file))
5960
self.assertEqual('https://linkml.github.io/linkml-model/model/schema/meta.yaml', str(fileloc.meta.yaml.github_loc()))
6061
self.assertEqual('https://raw.githubusercontent.com/linkml/linkml-model/f30637f5a585f3fc4b12fd3dbb3e7e95108d4b42/model/schema/meta.yaml', str(fileloc.meta.yaml.github_loc('v0.0.1')))
6162

0 commit comments

Comments
 (0)