Skip to content

fix(dtypes,strings): never abort cleaning on an unusual object cell #428

fix(dtypes,strings): never abort cleaning on an unusual object cell

fix(dtypes,strings): never abort cleaning on an unusual object cell #428

Workflow file for this run

name: Benchmark
# Reproducible FreshData benchmark harness on a pinned hardware tier
# (ubuntu-latest, 2-core, 7GB RAM). Runs the 10k-row fixture variants only;
# the 5M/25M/50M-row local variants are never run in CI (see the Makefile's
# `benchmark` target for the full-scale local run).
on:
push:
branches: [main]
pull_request:
paths:
- "benchmarks/**"
- "src/freshdata/**"
- ".github/workflows/benchmark.yml"
schedule:
- cron: "0 6 * * 1" # weekly, Monday 06:00 UTC
workflow_dispatch:
# Cancel superseded runs only for pull requests. Other runs are grouped per commit
# so a newer queued run on main cannot replace an older commit's queued run.
concurrency:
group: benchmark-${{ github.event_name }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
benchmark:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
pull-requests: write # PR summary comment only
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
cache: pip
- name: Install
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]" jsonschema
- name: Run benchmark (10k-row variants only)
run: python benchmarks/bench.py run --repeat 3
- name: Render report
run: python benchmarks/bench.py report
- name: Locate latest report
id: report
run: |
latest="$(ls -dt benchmarks/results/*/ | head -n1)"
echo "dir=${latest}" >> "$GITHUB_OUTPUT"
echo "md=${latest}report.md" >> "$GITHUB_OUTPUT"
- name: Job summary
run: cat "${{ steps.report.outputs.md }}" >> "$GITHUB_STEP_SUMMARY"
- name: Upload results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: benchmark-results
path: ${{ steps.report.outputs.dir }}
# Fork pull requests receive a read-only GITHUB_TOKEN, so attempting to
# create or update a PR comment would fail an otherwise successful run.
- name: Post PR summary comment
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const fs = require('fs');
const body = fs.readFileSync('${{ steps.report.outputs.md }}', 'utf8');
const marker = '<!-- freshdata-benchmark -->';
const out = `${marker}\n${body}`;
const { owner, repo } = context.repo;
const issue_number = context.issue.number;
const comments = await github.rest.issues.listComments({ owner, repo, issue_number });
const existing = comments.data.find(c => c.body && c.body.includes(marker));
if (existing) {
await github.rest.issues.updateComment({ owner, repo, comment_id: existing.id, body: out });
} else {
await github.rest.issues.createComment({ owner, repo, issue_number, body: out });
}