Skip to content

ci: 连续跑3次测试 #26

ci: 连续跑3次测试

ci: 连续跑3次测试 #26

Workflow file for this run

on:
push:
branches: [ "performance-compare" ]
name: Test & Lint peg version
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: stable
- run: go install github.com/pointlander/[email protected]
- run: peg -switch -inline roll.peg
- run: go mod tidy
- run: go get
- run: go generate ./...
- run: go test -v -bench=^BenchmarkInBoundsChannels$ -cpuprofile=cpu.out -memprofile mem.out .
# 第一遍是冷启动,再进行一次测试
- run: go test -v .
- run: go test -v .
- run: go test -v .
- name: Upload
uses: actions/upload-artifact@v4
with:
name: cpu-profile
path: ./cpu.out
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mem-profile
path: ./mem.out
lint:
runs-on: ubuntu-latest
steps:
- name: Code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.18'
- run: go install github.com/pointlander/[email protected]
- run: peg -switch -inline roll.peg
- run: go mod tidy
- run: go get
- run: go generate ./...
- name: Go vet
run: go vet ./...
- name: GolangCI-Lint
uses: golangci/golangci-lint-action@v3
if: github.event.name == 'pull_request'
with:
go-version: '1.18'
version: 'v1.57.2'
args: '--timeout 9999s'
only-new-issues: true
skip-pkg-cache: true
skip-build-cache: true
- name: GolangCI-Lint
uses: golangci/golangci-lint-action@v3
if: github.event.name != 'pull_request'
with:
version: 'v1.51.2'
args: '--timeout 9999s'