Skip to content

Collect

Collect #238

Workflow file for this run

name: Collect
on:
schedule:
# daily at 06:00 UTC
- cron: "0 6 * * *"
push:
branches: [main]
paths:
- packages/typestats-site/projects.toml
- src/typestats/schema.py
workflow_dispatch:
permissions: {}
concurrency:
group: collect
cancel-in-progress: false
jobs:
collect:
name: collect
runs-on: ubuntu-latest
timeout-minutes: 240
permissions:
contents: write # push collected data to the data branch
environment: reports
steps:
- name: checkout main
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: checkout data
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: data
path: _data
persist-credentials: true
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
python-version: "3.14t"
- name: collect type-coverage data
id: collect
run: >-
uv run -m typestats_site collect
--data-dir _data/reports
--backfill-limit 10
- name: Commit and push new data
if: always() && steps.collect.outcome != 'cancelled'
uses: EndBug/add-and-commit@290ea2c423ad77ca9c62ae0f5b224379612c0321 # v10.0.0
with:
add: reports/
commit: --signoff
cwd: _data
default_author: github_actions
message: "Update type-coverage data"
- name: Fail if collect failed
if: always() && steps.collect.outcome == 'failure'
run: exit 1