Skip to content

Use asset scheduling endpoint for all triggers; fall back to sensor e… #1010

Use asset scheduling endpoint for all triggers; fall back to sensor e…

Use asset scheduling endpoint for all triggers; fall back to sensor e… #1010

Workflow file for this run

name: tests
on:
push:
# Avoid using all the resources/limits available by checking only
# relevant branches and tags. Other branches can be checked via PRs.
branches: [main]
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+' # Match tags that resemble a version
- 'v[0-9]+\.[0-9]+\.[0-9]+' # Match tags that resemble a version
pull_request: # Run in every PR
workflow_dispatch: # Allow manually triggering the workflow
schedule:
# Run roughly every 15 days at 00:00 UTC
# (useful to check if updates on dependencies break the package)
- cron: "0 0 1,16 * *"
concurrency:
group: >-
${{ github.workflow }}-${{ github.ref_type }}-
${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
name: Check (on Python 3.12)
steps:
- uses: actions/checkout@v6
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: '.pre-commit-config.yaml'
version: "0.10.9"
- name: Install dev dependencies
run: uv sync --only-group dev --frozen
- uses: tox-dev/action-pre-commit-uv@v1
test:
needs: check
strategy:
fail-fast: false
matrix:
python:
- "3.10"
- "3.11"
- "3.12"
platform:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.platform }}
name: "Test (${{ matrix.platform }} on Python ${{ matrix.python }})"
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: "0.10.9"
python-version: ${{ matrix.python }}
- name: Install dependencies
run: uv sync --frozen --group test
- name: Run tests
run: uv run pytest tests --ignore=tests/s2 -rFEx --durations 10 --color yes --cov
- name: Show coverage report
run: uv run coverage report
- name: Generate coverage report
run: uv run coverage lcov -o coverage.lcov
- name: Upload partial coverage report
uses: coverallsapp/github-action@v2
with:
fail-on-error: false
path-to-lcov: coverage.lcov
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.platform }} - py${{ matrix.python }}
parallel: true
test-s2:
needs: check
runs-on: ubuntu-latest
name: "Test S2 (on Python 3.12)"
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: "0.10.9"
python-version-file: ".python-version"
- name: Install dependencies
run: uv sync --frozen --extra s2 --group test
- name: Run S2 tests
run: uv run pytest tests/s2 -rFEx --durations 10 --color yes
finalize:
needs: [ test, test-s2]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
fail-on-error: false
parallel-finished: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: echo "Finished checks"