68 lines (57 loc) · 1.69 KB
/
benchmark.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Benchmark
permissions:
contents: write
deployments: write
on:
push:
branches:
- main
pull_request:
jobs:
benchmark:
strategy:
fail-fast: false
matrix:
go-version: [1.19.x]
node-version: [16.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
with:
go-version: ${{ matrix.go-version }}
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
with:
node-version: ${{ matrix.node-version }}
- name: set env vars
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
fetch-depth: 0
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: |
~/go/pkg
~/.cache/go-build
~/Library/Caches/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: build dev docker image
run: |
./scripts/build-dev-docker.bash
- name: start cluster
run: |
export POMERIUM_TAG=dev
cd ./integration/clusters/single
docker-compose up -d
- name: integration tests
run: |
go test -bench Benchmark ./integration/... | tee benchmark.txt
- name: store benchmark
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "go"
output-file-path: benchmark.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true