Skip to content

Fix nil comparisons to match Shopify Liquid behavior #58

Fix nil comparisons to match Shopify Liquid behavior

Fix nil comparisons to match Shopify Liquid behavior #58

Workflow file for this run

name: Benchmarks
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
jobs:
benchmark:
name: Performance Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for comparison
submodules: true # Checkout reference-liquid submodule for benchmark tests
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: true
- name: Run benchmarks
run: |
cd performance
go test -bench=. -benchmem -benchtime=500ms | tee benchmark_results.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
continue-on-error: true # Don't fail if gh-pages branch doesn't exist yet
with:
name: Go Benchmark
tool: 'go'
output-file-path: performance/benchmark_results.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false # Disabled until gh-pages branch is set up
alert-threshold: '150%'
comment-on-alert: false
fail-on-alert: false
save-data-file: false # Disabled until gh-pages branch is created
comment-always: false
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: performance/benchmark_results.txt