Skip to content

Commit 6aab4db

Browse files
authored
run pydantic tests as an allowed-to-fail job (#767)
1 parent 1382deb commit 6aab4db

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,46 @@ jobs:
175175
- run: pip freeze
176176
- run: pytest
177177

178+
test-pydantic-integration:
179+
runs-on: ubuntu-latest
180+
181+
steps:
182+
- uses: actions/checkout@v3
183+
with:
184+
repository: pydantic/pydantic
185+
path: pydantic
186+
187+
- uses: actions/checkout@v3
188+
with:
189+
path: pydantic-core
190+
191+
- name: set up python
192+
uses: actions/setup-python@v4
193+
with:
194+
python-version: '3.11'
195+
196+
- name: install rust stable
197+
uses: dtolnay/rust-toolchain@stable
198+
199+
- name: cache rust
200+
uses: Swatinem/rust-cache@v2
201+
with:
202+
key: test-pydantic-integration
203+
204+
- name: install deps
205+
run: |
206+
pip install pdm maturin
207+
pdm venv create --with-pip
208+
pdm install -G testing
209+
pdm run pip install maturin
210+
pdm run bash -c 'cd ../pydantic-core && make build-dev'
211+
working-directory: pydantic
212+
213+
- run: pdm info && pdm list
214+
working-directory: pydantic
215+
- run: pdm run pytest
216+
working-directory: pydantic
217+
178218
lint:
179219
runs-on: ubuntu-latest
180220

@@ -296,14 +336,14 @@ jobs:
296336
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
297337
check:
298338
if: always()
299-
needs: [coverage, test-python, test-os, test-debug, lint, bench, build-wasm-emscripten]
339+
needs: [coverage, test-python, test-os, test-debug, test-pydantic-integration, lint, bench, build-wasm-emscripten]
300340
runs-on: ubuntu-latest
301341
steps:
302342
- name: Decide whether the needed jobs succeeded or failed
303343
uses: re-actors/alls-green@release/v1
304344
with:
305345
jobs: ${{ toJSON(needs) }}
306-
allowed-failures: coverage
346+
allowed-failures: coverage, test-pydantic-integration
307347

308348
build-sdist:
309349
name: build sdist

0 commit comments

Comments
 (0)