1+ name : Build and test linkml-runtime with latest dependency versions
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 5 * * 1' # once per week on Monday at 05:00 UTC
6+ workflow_dispatch :
7+ # Allows you to run this workflow manually from the Actions tab
8+ types : trigger-run-check-dependencies
9+
10+ jobs :
11+ test :
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ os : [ubuntu-latest, windows-latest]
16+ python-version : ["3.8", "3.9", "3.10"]
17+ exclude :
18+ - os : windows-latest
19+ python-version : " 3.8"
20+
21+ runs-on : ${{ matrix.os }}
22+
23+ steps :
24+
25+ # ----------------------------------------------
26+ # install poetry
27+ # ----------------------------------------------
28+ - name : Install Poetry
29+ # Pin to 1.3.2 to workaround https://github.com/python-poetry/poetry/issues/7611
30+ run : pipx install poetry==1.3.2
31+
32+ # ----------------------------------------------
33+ # check-out repo and set-up python
34+ # ----------------------------------------------
35+ - name : Check out repository
36+ uses : actions/checkout@v3
37+
38+ - name : Set up Python ${{ matrix.python-version }}
39+ uses : actions/setup-python@v4
40+ with :
41+ python-version : ${{ matrix.python-version }}
42+ cache : ' poetry'
43+
44+ # ----------------------------------------------
45+ # install your root project, if required
46+ # ----------------------------------------------
47+ - name : Install library
48+ run : poetry install --no-interaction
49+
50+ # this step we remove and rebuild the poetry.lock file to ensure that the tests that follow can be run
51+ # with the latest dependencies
52+
53+ # ----------------------------------------------
54+ # Remove and Rebuild the poetry.lock File
55+ # ----------------------------------------------
56+ - name : Remove poetry.lock (Unix)
57+ if : runner.os != 'Windows'
58+ run : rm -rf poetry.lock
59+
60+ - name : Remove poetry.lock (Windows)
61+ if : runner.os == 'Windows'
62+ run : Remove-Item poetry.lock -Force
63+
64+ - name : Run tests
65+ run : poetry run python -m unittest discover
0 commit comments