Skip to content

Commit a5d29a5

Browse files
committed
update GitHub Actions workflows
1 parent a3832a5 commit a5d29a5

File tree

5 files changed

+43
-58
lines changed

5 files changed

+43
-58
lines changed

.github/workflows/build-publish-documentation.yaml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@ on:
55
push:
66
branches:
77
- main
8+
pull_request:
9+
branches:
10+
- main
811

912
jobs:
1013
github-pages:
1114
runs-on: ubuntu-latest
1215

16+
strategy:
17+
matrix:
18+
python-version: [ "3.10" ]
19+
1320
permissions:
1421
contents: write
1522

@@ -18,40 +25,30 @@ jobs:
1825
# check-out repo and set-up python
1926
#----------------------------------------------
2027
- name: Check out repository
21-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4.2.2
2229
with:
2330
fetch-depth: 0 # fetch all commits/branches so that mike works
2431

25-
- name: Setup Python 3.9
26-
uses: actions/setup-python@v4
32+
- name: Setup Python ${{ matrix.python-version }}
33+
uses: actions/setup-python@v5.6.0
34+
id: setup-python
2735
with:
28-
python-version: 3.9
36+
python-version: ${{ matrix.python-version }}
37+
cache: 'poetry'
2938

3039
#----------------------------------------------
3140
# install & configure poetry
3241
#----------------------------------------------
3342
- name: Install Poetry
34-
uses: snok/install-poetry@v1.3
35-
with:
36-
virtualenvs-create: true
37-
virtualenvs-in-project: true
38-
39-
#----------------------------------------------
40-
# load cached venv if cache exists
41-
#----------------------------------------------
42-
- name: Load cached venv
43-
id: cached-poetry-dependencies
44-
uses: actions/cache@v3
45-
with:
46-
path: .venv
47-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
43+
run: |
44+
pipx install poetry
45+
pipx inject poetry poetry-dynamic-versioning
4846
4947
#----------------------------------------------
50-
# install dependencies if cache does not exist
48+
# install dependencies
5149
#----------------------------------------------
5250
- name: Install dependencies
53-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
54-
run: poetry install --no-interaction --no-root
51+
run: poetry install --no-interaction --with docs --no-root --all-extras
5552

5653
- name: Configure git user
5754
run: |

.github/workflows/codespell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4.2.2
2020

2121
- name: Codespell
22-
uses: codespell-project/actions-codespell@v2
22+
uses: codespell-project/actions-codespell@v2.1

.github/workflows/main.yaml

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,59 +6,48 @@ name: Build and test linkml-model
66

77
on:
88
pull_request:
9-
branches: [ main ]
10-
types: [ opened, synchronize, reopened ]
9+
branches: [main]
10+
types: [opened, synchronize, reopened]
1111

1212
jobs:
1313
test:
14-
1514
runs-on: ubuntu-latest
15+
1616
strategy:
1717
matrix:
1818
python-version: ["3.9", "3.10"]
1919

2020
steps:
21-
2221
#----------------------------------------------
2322
# check-out repo and set-up python
2423
#----------------------------------------------
2524
- name: Check out repository
26-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4.2.2
26+
with:
27+
fetch-depth: 0
2728

2829
- name: Set up Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v4
30+
uses: actions/setup-python@v5.6.0
3031
with:
3132
python-version: ${{ matrix.python-version }}
33+
cache: "poetry"
3234

3335
#----------------------------------------------
3436
# install & configure poetry
3537
#----------------------------------------------
3638
- name: Install Poetry
37-
uses: snok/install-poetry@v1.3
38-
with:
39-
virtualenvs-create: true
40-
virtualenvs-in-project: true
39+
run: |
40+
pipx install poetry
41+
pipx inject poetry poetry-dynamic-versioning
4142
4243
#----------------------------------------------
43-
# load cached venv if cache exists
44-
#----------------------------------------------
45-
- name: Load cached venv
46-
id: cached-poetry-dependencies
47-
uses: actions/cache@v3
48-
with:
49-
path: .venv
50-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
51-
52-
#----------------------------------------------
53-
# install dependencies if cache does not exist
44+
# install dependencies
5445
#----------------------------------------------
5546
- name: Install dependencies
56-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
57-
run: poetry install --no-interaction --no-root
47+
run: oetry install --no-interaction --all-extras --no-root
5848

5949
#----------------------------------------------
60-
# run test suite
50+
# run test suite
6151
#----------------------------------------------
6252
- name: Run tests
6353
run: make test
64-

.github/workflows/release.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@ jobs:
1414

1515
steps:
1616
- name: Checkout repo
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4.2.2
1818
with:
1919
fetch-depth: 0 # fetch all commits/branches so that mike works
2020

2121
- name: Set up Python
22-
uses: actions/setup-python@v4
22+
uses: actions/setup-python@v5.6.0
2323
with:
24-
python-version: 3.9
24+
python-version: 3.10
2525

2626
- name: Install Poetry
27-
uses: snok/install-poetry@v1.3
28-
with:
29-
virtualenvs-create: true
30-
virtualenvs-in-project: true
27+
run: |
28+
pipx install poetry
29+
pipx inject poetry poetry-dynamic-versioning
3130
3231
- name: Install dependencies
3332
run: poetry install --no-interaction
@@ -39,14 +38,14 @@ jobs:
3938
4039
- name: Publish distribution to PyPI
4140
if: github.repository == 'linkml/linkml-model'
42-
uses: pypa/gh-action-pypi-publish@v1.2.2
41+
uses: pypa/gh-action-pypi-publish@v1.12.4
4342
with:
4443
user: __token__
4544
password: ${{ secrets.pypi_password }}
4645

4746
- name: Parse version from tag
4847
id: version
49-
uses: release-kit/semver@v2
48+
uses: release-kit/semver@v2.0.7
5049

5150
- name: Configure git user
5251
run: |

.github/workflows/validate-yaml-syntax.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Check out repository
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4.2.2
1515

1616
- name: Validate YAML file
1717
run: yamllint -c .yamllint-config linkml_model/model/schema/*.yaml

0 commit comments

Comments
 (0)