Skip to content

⬆ bump codecov/codecov-action from 4 to 5 #233

⬆ bump codecov/codecov-action from 4 to 5

⬆ bump codecov/codecov-action from 4 to 5 #233

Workflow file for this run

name: test
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
branches:
- "main"
- "*.*.*"
paths-ignore:
- 'docs/**'
- '*.md'
permissions:
contents: read
jobs:
tests:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.13-dev"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
if: "!endsWith(matrix.python-version, '-dev')"
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Set up Pre-release Python with no GIL
uses: deadsnakes/action@v3.2.0
if: "endsWith(matrix.python-version, '-dev')"
with:
python-version: ${{ matrix.python-version }}
nogil: true
- uses: actions/cache@v4
id: cache
with:
path: .venv
key: ${{ runner.os }}-python-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}-test-02
- 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 -e .[all]
uv pip install pytest freezegun
- name: Check 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: Use Python virtual environment
run: |
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV
- name: Check git is working
run: |
git config --global user.email "ddeutils@github.actions"
git config --global user.name "Testing Git on Testing"
git --version
git config --list
- name: Test with Pytest
run: |
pytest -v