-
Notifications
You must be signed in to change notification settings - Fork 102
64 lines (61 loc) · 2.41 KB
/
ci.yml
File metadata and controls
64 lines (61 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Continuous Integration
permissions:
contents: read
actions: write
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- "releases/*"
jobs:
# Build and test the project
build-lint-test:
strategy:
fail-fast: true
matrix:
python: ["3.10", "3.14"]
os: [ubuntu-latest, macos-intel, macos-arm, windows-latest]
include:
- os: macos-intel
runsOn: macos-15-intel
- os: macos-arm
runsOn: macos-latest
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8
- name: Print build information
run: "echo head_ref: ${{ github.head_ref }}, ref: ${{ github.ref }}, os: ${{ matrix.os }}, python: ${{ matrix.python }}"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python }}
- run: uv tool install poethepoet
- run: uv sync --group=dsl --group=encryption --group=trio-async
- run: poe lint
- run: mkdir junit-xml
- run: poe test -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
- run: poe test -s --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml
# This must remain the last step since it downgrades pydantic
- name: Uninstall pydantic
shell: bash
run: |
echo y | uv run pip uninstall pydantic
echo y | uv run pip uninstall pydantic-core
uv run pip install pydantic==1.10
poe test -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--pydantic-v1.xml tests/pydantic_converter_v1/workflow_test.py
# On latest, run gevent test
- name: Gevent test
if: ${{ matrix.python == '3.12' }}
run: |
uv sync --group gevent
uv run gevent_async/test/run_combined.py
- name: Upload junit-xml artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
if: always()
with:
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{ matrix.python }}--${{ matrix.os }}
path: junit-xml
retention-days: 14