Skip to content

chore(deps): bump ghcr.io/devcontainers/features/docker-in-docker from 4.0.0 to 4.1.0 #258

chore(deps): bump ghcr.io/devcontainers/features/docker-in-docker from 4.0.0 to 4.1.0

chore(deps): bump ghcr.io/devcontainers/features/docker-in-docker from 4.0.0 to 4.1.0 #258

Workflow file for this run

---
name: Benchmark
on:
workflow_dispatch:
pull_request:
types: [labeled, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmark:
name: Benchmark
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'benchmark')
permissions:
contents: read
actions: read
pull-requests: write
strategy:
fail-fast: true
matrix:
python-version: ["3.11"]
runs-on: ["ubuntu-latest"]
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Free Disk Space
uses: twsl/gha-free-disk-space@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "**/uv.lock"
- name: Install dependencies
run: uv sync --all-groups --all-extras --frozen
- name: Cache benchmark results
uses: actions/cache@v6
with:
path: .benchmarks
key: benchmark-${{ runner.os }}-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: |
benchmark-${{ runner.os }}-${{ matrix.python-version }}-
- name: Run benchmarks
id: benchmark
env:
PYTHONWARNINGS: "ignore:__array__ implementation doesn't accept a copy keyword"
run: |
BENCHMARK_ARGS="--benchmark-only --benchmark-save=current --benchmark-storage=.benchmarks"
if find .benchmarks -name '*.json' -print -quit 2>/dev/null | grep -q .; then
BENCHMARK_ARGS="$BENCHMARK_ARGS --benchmark-compare"
fi
uv run pytest -c pyproject.toml \
$BENCHMARK_ARGS \
| tee benchmark-output.txt
- name: Post benchmark results to job summary
run: |
echo "## Benchmark Results" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
cat benchmark-output.txt >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "Results for commit ${{ github.sha }}." >> "$GITHUB_STEP_SUMMARY"
- name: Post benchmark results to pull request
if: github.event_name == 'pull_request'
uses: actions/github-script@v9
with:
script: |
const fs = require('fs');
const output = fs.readFileSync('benchmark-output.txt', 'utf8');
const body = [
'## Benchmark Results',
'',
'```',
output.trim(),
'```',
'',
`Results for commit ${{ github.sha }}.`,
].join('\n');
await github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
body,
event: 'COMMENT',
});