Skip to content

ci: Move from Gitlab to Github #5

ci: Move from Gitlab to Github

ci: Move from Gitlab to Github #5

Workflow file for this run

name: Benchmark
on:
push:
branches:
- master
tags:
- v*
# temporary for testing
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
benchmark:
name: benchmark
runs-on: ubuntu-latest
container:
image: paritytech/node-wrk:latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: benchmarks
run: |
yarn --immutable
echo "Benchmarks for polkadot"
mkdir -p artifacts
yarn bench --log-level info --ws-url wss://rpc.polkadot.io
mv benchmarks.txt artifacts/
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: benchmarks
path: ./artifacts
- name: Modify benches result for benhcmark action
run: ./scripts/ci/benchmarks/generate_benchmark_result.sh artifacts/benchmarks.txt > artifacts/benchmarks.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 #1.20.4
with:
tool: "customSmallerIsBetter"
output-file-path: artifacts/benchmarks.json
# Push and deploy GitHub pages branch automatically
auto-push: true
github-token: ${{ secrets.GITHUB_TOKEN }}