forked from nytimes/gziphandler
-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (32 loc) · 970 Bytes
/
build.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '>=1.17.0'
- name: Install brotli
run: sudo apt-get install libbrotli-dev
- name: Build
run: go build -v ./...
- name: Test
run:
go test -race -count=5 -coverprofile=coverage.txt -covermode=atomic ./...
(cd contrib/gin-gonic/gin && go test -race)
(cd contrib/gofiber/fiber/v2 && go test -race)
(cd contrib/labstack/echo && go test -race)
- name: Profile memory
run:
go test -run=^$ -bench=. -short -memprofile mem.prof
go tool pprof -sample_index alloc_objects -top mem.prof
go tool pprof -sample_index alloc_space -top mem.prof
- name: Codecov
uses: codecov/codecov-action@v1.1.1