feat: reuse etcd-mutex instance #1308
Workflow file for this run
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: CI AND IT | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- develop | |
- master | |
- release/* | |
pull_request: | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.22 | |
- name: Run Lint | |
uses: golangci/golangci-lint-action@v3 | |
- name: Run Test | |
run: | | |
echo $GOARCH | |
go test -cpu=2 -timeout 10s -race -coverprofile=coverage.txt -covermode=atomic ./... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: . | |
fail_ci_if_error: true | |
flags: by-github-actions | |
CODE-CHECK: | |
runs-on: ubuntu-latest | |
container: | |
image: registry.erda.cloud/erda/erda-base:20240410 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run go mod tidy | |
run: make tidy | |
- name: Run Go Lint | |
run: | | |
go install github.com/golangci/golangci-lint/cmd/[email protected] | |
golangci-lint run --timeout=15m ./... | |
# - name: Run Go Vet | |
# run: go vet ./... |