Trigger Site Rebuild on a CRON Schedule #395
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Trigger Site Rebuild on a CRON Schedule" | |
on: | |
schedule: | |
# runs at 02:00 every day, UTC | |
- cron: "0 2 * * *" | |
env: | |
GO_VERSION: '1.20' | |
jobs: | |
benchmark-publish: | |
name: Run Benchmark | |
if: github.repository == 'open-feature/flagd' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Setup go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Workspace init | |
run: make workspace-init | |
- name: Run benchmark | |
run: set -o pipefail; go test -bench=Bench -short -benchtime=5s -benchmem ./core/... | tee output.txt | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: Go Benchmark | |
tool: "go" | |
output-file-path: output.txt | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
auto-push: true | |
# Show alert with commit comment on detecting possible performance regression | |
alert-threshold: "130%" | |
comment-on-alert: true | |
fail-on-alert: false |