[refactor] reset rocketmq interceptor log level #283
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
services: | |
etcd: | |
# Docker Hub image | |
image: bitnami/etcd:3.5.0 | |
env: | |
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379 | |
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379 | |
ETCDCTL_API: 3 | |
ALLOW_NONE_AUTHENTICATION: yes | |
ports: | |
- 2379:2379 | |
redis: | |
# Docker Hub image | |
image: redis:5.0.13 | |
ports: | |
- 6379:6379 | |
# Set health checks to wait until redis has started | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
--health-retries=10 | |
mongo: | |
# Docker Hub image | |
image: mongo:3.6.21-xenial | |
env: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: 123456 | |
MONGO_INITDB_DATABASE: test | |
ports: | |
- 27017:27017 | |
# Set health checks to wait until redis has started | |
options: >- | |
--health-cmd mongo | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
elasticsearch: | |
# Docker Hub image | |
image: elasticsearch:7.10.1 | |
ports: | |
- 9200:9200 | |
env: | |
discovery.type: single-node | |
options: >- | |
--health-cmd="curl http://localhost:9200/_cluster/health" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=10 | |
mysql: | |
# Docker Hub image | |
image: mysql:5.7 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: test | |
ports: | |
- 3306:3306 | |
# Set health checks to wait until redis has started | |
options: >- | |
--health-cmd="mysqladmin ping" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=10 | |
steps: | |
- name: Set up Minio | |
run: | | |
docker run -d -p 9000:9000 --name minio \ | |
-e "MINIO_ACCESS_KEY=XMFMOKB2FJWA0I9JIR62" \ | |
-e "MINIO_SECRET_KEY=aMRKmxoRcb+Ezr5CmOmFAqFwYWPrEFA7UdtWWWOl" \ | |
-v /tmp:/data \ | |
minio/minio:RELEASE.2021-08-20T18-32-01Z server /data | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.17 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Get dependencies | |
run: | | |
go get -v -t -d ./... | |
if [ -f Gopkg.toml ]; then | |
curl https://github.com/golang/dep/master/install.sh | sh | |
dep ensure | |
fi | |
- name: Install goimports | |
run: go get golang.org/x/tools/cmd/goimports | |
- name: Install go ci lint | |
run: curl -sSfL https://github.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.34.1 | |
# - name: Run Linter | |
# run: GO111MODULE=on golangci-lint run --timeout=10m -v --disable-all --enable=govet --enable=gofmt --enable=goimports --enable=ineffassign --enable=misspell --enable=staticcheck | |
- name: Test | |
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./pkg/... | |
- name: Codecov | |
uses: codecov/codecov-action@v1.0.14 |