Skip to content

📦 build: update pydantic requirement from <3.0.0,==2.11.7 to ==2.11.9 #993

📦 build: update pydantic requirement from <3.0.0,==2.11.7 to ==2.11.9

📦 build: update pydantic requirement from <3.0.0,==2.11.7 to ==2.11.9 #993

Workflow file for this run

name: test
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
branches:
- "main"
- "*.*.*"
paths-ignore:
- 'docs/**'
- '*.md'
jobs:
tests:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
# - "3.13t"
# marker:
# - "poke"
# - "not_poke"
# worker_id: [1, 2, 3, 4]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
id: setup_python
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: actions/cache@v4
id: cache
with:
path: .venv
key: ${{ runner.os }}-python-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}-test-uv
- name: Install Python Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
uv pip install -U pip
uv pip install -U -e .[all]
uv pip install -U pytest freezegun pytest-asyncio
uv pip list
- name: Use Python virtual environment
run: |
echo "${GITHUB_WORKSPACE}/.venv/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=${GITHUB_WORKSPACE}/.venv" >> $GITHUB_ENV
python -c "import pathlib; print(pathlib.Path('.').resolve())"
- name: Check Python GIL
if: "startsWith(matrix.python-version, '3.13')"
run: |
python --version --version
which python
python -c "import sysconfig; print(sysconfig.get_config_var('Py_GIL_DISABLED'))"
python -c "import sys; print(sys._is_gil_enabled())"
- name: Check Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Testing Git on Testing"
git --version
git config --list
# NOTE: I set OS level for timezone because I have schedule object
# testcase.
# TODO: I should seeing this is necessary task on GitHub action, right?
# Because it does not depend on OS level when you pass tz to schedule
# object or not, and it will use UTC for default.
- uses: MathRobin/[email protected]
with:
timezoneLinux: "Asia/Bangkok"
# # 👇 We need to set up the env vars from values taken from the matrix
# - name: Set up worker env vars
# run: |
# echo "GITHUB_WORKER_ID=${{matrix.worker_id}}" >> $GITHUB_ENV
# echo "GITHUB_TOTAL_WORKERS=4" >> $GITHUB_ENV
- name: Test with Pytest with not mark poke and schedule
run: |
pytest -vv -s -m "not schedule"
# - name: Tests with Pytest with mark poke - Worker. ${{ matrix.worker_id }}
# - name: Test with Pytest with mark poke and schedule
# if: ${{ matrix.python-version == '3.9' }}
# run: |
# pytest -vv -s -m "poke" &
# pytest -vv -s -m "schedule" &
# wait
# run: |
# pytest -vv -s -m "schedule"