Skip to content

feat:add timeout sample #1726

feat:add timeout sample

feat:add timeout sample #1726

Workflow file for this run

name: CI
on:
push:
branches: [master, develop]
pull_request:
branches: "*"
jobs:
build:
name: ${{ matrix.os }} - Go ${{ matrix.go_version }}
runs-on: ${{ matrix.os }}
strategy:
# If you want to matrix build , you can append the following list.
matrix:
go_version:
- 1.17
os:
- ubuntu-latest
env:
DING_TOKEN: ${{ secrets.DING_TOKEN }}
DING_SIGN: ${{ secrets.DING_SIGN }}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4.0.0
- name: Cache dependencies
uses: actions/cache@v3.2.6
with:
# Cache
path: ~/go/pkg/mod
# Cache key
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: |
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
else
go get -v -t -d ./...
fi
- name: Go Fmt
run: |
go fmt ./... && git status && [[ -z `git status -s` ]]
# diff -u <(echo -n) <(gofmt -d -s .)
- name: Run Linter
uses: golangci/golangci-lint-action@v3
with:
args: --timeout 10m --verbose
- name: License
run: make -f build/Makefile license
- name: Integration Test
run: |
./start_integrate_test.sh