github.com/0chain/gosdk@v1.17.11/.github/workflows/benchmark.yml (about) 1 name: Benchmark tests 2 3 on: 4 push: 5 branches: [ master, staging ] 6 7 jobs: 8 benchmark: 9 runs-on: [self-hosted, build] 10 steps: 11 - uses: actions/checkout@v2 12 - name: Setup go 1.20 13 uses: actions/setup-go@v2 14 with: 15 go-version: '1.20' # The Go version to download (if necessary) and use. 16 # - name: Set GITHUB_ENV 17 # run: | 18 # echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV 19 # echo "GOSDK=$(echo $(dirname $(pwd)))/gosdk" >> $GITHUB_ENV 20 # echo "TAG=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g' )" >> $GITHUB_ENV 21 22 - name: Run benchmark 23 run: go test -tags bn256 -benchmem -benchtime=5s -run="BenchmarkChunkedUpload*" -bench="BenchmarkChunkedUpload*" ./... | tee benchmark.txt 24 25 # Run `github-action-benchmark` action 26 # - name: Push benchmark report 27 # uses: cnlangzi/github-action-benchmark@v1 28 # with: 29 # name: 0chain/gosdk Benchmark 30 # tool: 'go' 31 # benchmark-data-dir-path: ${{ env.TAG }}/bench 32 # output-file-path: benchmark.txt 33 # # Personal access token to deploy GitHub Pages branch 34 # github-token: ${{ secrets.GOSDK }} 35 # #github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }} 36 # # Push and deploy GitHub pages branch automatically 37 # auto-push: true