Skip to content

fix: improve pub.dev score (description, changelog, example, lint) #14

fix: improve pub.dev score (description, changelog, example, lint)

fix: improve pub.dev score (description, changelog, example, lint) #14

Workflow file for this run

name: Benchmark
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: benchmark-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Install dependencies
run: dart pub get
# On PRs: download the baseline from the latest main run
- name: Download baseline from main
if: github.event_name == 'pull_request'
uses: dawidd6/action-download-artifact@v6
with:
workflow: benchmark.yml
branch: main
name: benchmark-baseline
path: benchmark/
if_no_artifact_found: warn
# Run benchmarks (with --save to capture results, --ci for markdown)
- name: Run benchmarks
run: dart run benchmark/benchmark.dart --save --ci
# On main: upload baseline for future PR comparisons
- name: Upload baseline
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: benchmark-baseline
path: benchmark/baseline.json
retention-days: 90
# On PRs: post results as a comment
- name: Post benchmark comment
if: github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: benchmark
path: benchmark/results.md