-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (86 loc) · 2.87 KB
/
1_test.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# name: Tests
# on:
# workflow_dispatch:
# push:
# branches: ["main"]
# tags-ignore: ["**"]
# pull_request:
# concurrency:
# group: check-${{ github.ref }}
# cancel-in-progress: true
# jobs:
# pre-commit:
# runs-on: ubuntu-latest
# if: github.event.repository.fork == false
# steps:
# - uses: actions/[email protected]
# - name: Install uv
# uses: astral-sh/[email protected]
# - name: Set up Python 3.10
# run: uv python install 3.10
# - name: Install the project
# run: uv sync --all-extras --dev
# - uses: tox-dev/[email protected]
# env:
# SKIP: "detect-aws-credentials,no-commit-to-branch"
# unit-tests:
# needs: [pre-commit]
# name: test with ${{ matrix.python-version }} on ${{ matrix.os }} with ${{ matrix.pydantic-version }}
# runs-on: ${{ matrix.os }}
# if: github.event.repository.fork == false
# strategy:
# fail-fast: false
# matrix:
# python-version:
# - "3.13"
# - "3.12"
# - "3.11"
# - "3.10"
# pydantic-version:
# - "pydantic-v1"
# - "pydantic-v2"
# os:
# - ubuntu-latest
# # - macos-latest
# - windows-latest
# steps:
# - uses: actions/[email protected]
# with:
# fetch-depth: 0
# - name: Install the latest version of uv
# uses: astral-sh/[email protected]
# with:
# enable-cache: true
# cache-dependency-glob: "pyproject.toml"
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Add .local/bin to Windows PATH
# if: runner.os == 'Windows'
# shell: bash
# run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
# - name: Set up Python ${{ matrix.python-version }}
# run: uv python install ${{ matrix.python-version }}
# - name: Run Imports Tests
# run: |
# uv sync
# uv pip install pytest pytest-asyncio pytest-cov greenlet
# uv run pytest --cov --cov-append -m 'imports' tests/unit/test_imports.py
# uv sync --group=dev --all-extras
# - name: Install Pydantic v1
# if: matrix.pydantic-version == 'pydantic-v1'
# run: uv pip install "pydantic>=1.10.19,<2.0.0"
# - name: Install Pydantic v2
# if: matrix.pydantic-version == 'pydantic-v2'
# run: uv pip install "pydantic>=2.10.3,<3.0.0"
# - name: Run Unit Tests
# run: |
# uv run pytest --cov --cov-append -m 'unit'
# uv run coverage xml
# - name: Upload coverage to Codecov
# uses: codecov/[email protected]
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# env_vars: OS,PYTHON
# fail_ci_if_error: true
# flags: unittests
# name: codecov-umbrella
# verbose: true