mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-06-05 23:03:48 +00:00
d141fe3c04
* Fix the introduced bug where RO endpoint could've been accidentally used.
73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
name: Test and release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths-ignore:
|
|
- "**/**.md"
|
|
- "**/**.yaml"
|
|
- "static/**"
|
|
branches:
|
|
- "main"
|
|
|
|
env:
|
|
GO_VERSION: ">=1.21"
|
|
|
|
permissions:
|
|
# deployments permission to deploy GitHub pages website
|
|
deployments: write
|
|
# contents permission to update benchmark contents in gh-pages branch
|
|
contents: write
|
|
|
|
jobs:
|
|
shared:
|
|
uses: telegram-bot-app/ci-scripts/.github/workflows/build-test-publish-inject.yaml@main
|
|
with:
|
|
enable-code-scans: false
|
|
should-deploy: false
|
|
secrets:
|
|
ghcr-token: ${{ secrets.GHCR_TOKEN }}
|
|
|
|
test:
|
|
name: "Benchmarking the results"
|
|
needs: [shared]
|
|
runs-on: ubuntu-latest
|
|
container: golang:1
|
|
# container: github/super-linter:v4
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{env.GO_VERSION}}
|
|
cache-dependency-path: "**/*.sum"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install ca-certificates make -y
|
|
update-ca-certificates
|
|
go mod tidy
|
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
- name: Run benchmark
|
|
run: |
|
|
go test -bench=. -benchmem ./... -run=^# | tee output.txt
|
|
|
|
- name: Store benchmark result
|
|
uses: benchmark-action/github-action-benchmark@v1
|
|
with:
|
|
tool: "go"
|
|
output-file-path: output.txt
|
|
fail-on-alert: true
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
comment-on-alert: true
|
|
summary-always: true
|
|
# auto-push only if it's on main branch
|
|
auto-push: true
|
|
gh-pages-branch: "gh-pages"
|
|
benchmark-data-dir-path: "docs"
|