Skip to content

Add robustness to failure of python multiprocessing #27

Add robustness to failure of python multiprocessing

Add robustness to failure of python multiprocessing #27

Workflow file for this run

name: Run linters and tests
on:
push:
branches:
- master
pull_request:
permissions:
pull-requests: read
jobs:
changelog:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Check CHANGELOG was updated
run: |
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^CHANGELOG.md$"; then
echo "✅ CHANGELOG.md was updated"
else
echo "❌ ERROR: CHANGELOG.md was not updated"
echo "Please add your changes to the CHANGELOG.md file"
exit 1
fi
check:
runs-on: ubuntu-latest
env:
API_KEY: ${{ secrets.API_KEY }}
API_SECRET: ${{ secrets.API_SECRET }}
AFFILIATE_TAG: ${{ secrets.AFFILIATE_TAG }}
COUNTRY_CODE: ${{ secrets.COUNTRY_CODE }}
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install UV
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Cache UV dependencies
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Cache pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pre-commit-
- name: Run all checks
run: |
uv run pre-commit run --all-files
test:
runs-on: ubuntu-latest
timeout-minutes: 2
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- uses: actions/checkout@v5
- name: Install UV
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Cache UV dependencies
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-py${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-uv-py${{ matrix.python-version }}-
- name: Run tests
run: uv run --python "${{ matrix.python-version }}" pytest -rs --no-cov