Skip to content

Commit 535291a

Browse files
author
matmoncon
committed
ci: update test workflow to run pydantic v1 and v2
1 parent 63ffa26 commit 535291a

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [main, develop]
5+
branches: [main, develop, feat/pydantic-v2]
66
pull_request:
7-
branches: [main, develop]
7+
branches: [main, develop, feat/pydantic-v2]
88

99
jobs:
1010
lint:
@@ -40,13 +40,13 @@ jobs:
4040

4141
- name: Configure poetry
4242
shell: bash
43-
run: python -m poetry config virtualenvs.in-project true
43+
run: poetry config virtualenvs.in-project true
4444

4545
- name: View poetry version
4646
run: poetry --version
4747

4848
- name: Install dependencies
49-
run: python -m poetry install
49+
run: poetry install
5050

5151
- name: Run linter
5252
run: poetry run pylint --rcfile=.pylintrc pyneo4j_ogm tests
@@ -84,13 +84,13 @@ jobs:
8484

8585
- name: Configure poetry
8686
shell: bash
87-
run: python -m poetry config virtualenvs.in-project true
87+
run: poetry config virtualenvs.in-project true
8888

8989
- name: View poetry version
9090
run: poetry --version
9191

9292
- name: Install dependencies
93-
run: python -m poetry install
93+
run: poetry install
9494

9595
- name: Run type-checker
9696
run: poetry run pyright pyneo4j_ogm tests
@@ -110,6 +110,7 @@ jobs:
110110
fail-fast: false
111111
matrix:
112112
python-version: [3.10.6, 3.11]
113+
pydantic-version: ["1.10.9", "^2"]
113114

114115
steps:
115116
- uses: actions/checkout@v3
@@ -135,16 +136,21 @@ jobs:
135136

136137
- name: Configure poetry
137138
shell: bash
138-
run: python -m poetry config virtualenvs.in-project true
139+
run: poetry config virtualenvs.in-project true
139140

140141
- name: View poetry version
141142
run: poetry --version
142143

143144
- name: Install dependencies
144-
run: python -m poetry install
145+
run: |
146+
poetry install
147+
poetry add pydantic@${{ matrix.pydantic-version }}
148+
149+
- name: View pydantic version
150+
run: poetry show pydantic
145151

146152
- name: Run tests
147-
run: poetry run pytest tests --asyncio-mode=auto --cov --disable-warnings
153+
run: poetry run pytest
148154

149155
release:
150156
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)