Skip to content

fix(ci): asset autodetect and expected patterns #1520

fix(ci): asset autodetect and expected patterns

fix(ci): asset autodetect and expected patterns #1520

Workflow file for this run

name: pytest
on:
pull_request:
push:
branches: [main]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
setup-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v6
- name: Cache release downloads
id: cache-release-downloads
uses: actions/cache@v4
with:
path: tests/release_jsons
key: release-downloads-v1-${{ hashFiles('examples/examples.yaml') }}
restore-keys: |
release-downloads-v1-
- name: Download release JSONs
if: steps.cache-release-downloads.outputs.cache-hit != 'true'
run: uv run ./tests/download_release_jsons.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
needs: setup-cache
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv sync --all-extras
- name: Restore release downloads cache
uses: actions/cache@v4
with:
path: tests/release_jsons
key: release-downloads-v1-${{ hashFiles('examples/examples.yaml') }}
restore-keys: |
release-downloads-v1-
- name: Run pytest
run: uv run pytest -vvv
- name: Upload coverage reports to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}