-
Notifications
You must be signed in to change notification settings - Fork 50
58 lines (52 loc) · 1.34 KB
/
bench-test.yml
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
name: Bench Test
on:
push:
paths:
- bench/**/*
- webapp/**/*
- development/**/*
- .github/workflows/bench-test.yml
jobs:
test:
strategy:
matrix:
go:
- 1.21.1
name: Build
runs-on: [isucon13-ci]
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
# containers
- name: Setup containers(mysql,pdns,webapp)
working-directory: ./development
run: |
sudo docker compose -f docker-compose-go.yml -f docker-compose-common.yml down --volumes
sudo docker compose -f docker-compose-go.yml -f docker-compose-common.yml up -d --build
sudo docker compose -f docker-compose-go.yml -f docker-compose-common.yml ps
# bench
- name: "[bench] Get deps"
working-directory: ./bench
env:
TZ: Asia/Tokyo
run: |
go get -v -t -d ./...
- name: "[bench] Test"
working-directory: ./bench
env:
TZ: Asia/Tokyo
run: |
go clean -testcache
go test -p=1 -v ./...
- name: "[bench] Benchmark"
working-directory: ./bench
env:
TZ: Asia/Tokyo
run: |
make build
./bin/bench_linux_amd64 run --dns-port=1053