fix: reduce config warnings #5655
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'release-*' | |
| - 'feature-*' | |
| pull_request: | |
| branches: "*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| license: | |
| name: Check License Header | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check License Header | |
| uses: apache/skywalking-eyes/header@main | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| config: .licenserc.yaml | |
| mode: check | |
| 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.23' | |
| os: | |
| - ubuntu-latest | |
| steps: | |
| - name: Setup Go ${{ matrix.go_version }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go_version }} | |
| id: go | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Cache dependencies | |
| # ref: https://github.com/actions/cache/blob/main/examples.md#go---module | |
| uses: actions/cache@v4 | |
| with: | |
| # Cache, works only on Linux | |
| path: | | |
| ~/.cache/go-build | |
| ~/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: Merge code into the upstream | |
| if: ${{ github.event_name == 'pull_request' }} | |
| run: | | |
| git fetch origin $GITHUB_BASE_REF | |
| git checkout -b $GITHUB_BASE_REF origin/$GITHUB_BASE_REF | |
| git remote add devrepo https://github.com/${{github.event.pull_request.head.repo.full_name}}.git | |
| git fetch devrepo ${{github.event.pull_request.head.sha}} | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "robot" | |
| git merge ${{github.event.pull_request.head.sha}} | |
| - name: Install 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 | |
| go install github.com/dubbogo/tools/cmd/imports-formatter@latest | |
| - name: Format code | |
| run: | | |
| go fmt ./... && GOROOT=$(go env GOROOT) imports-formatter && git status && [[ -z `git status -s` ]] | |
| - name: Verify | |
| run: | | |
| go mod tidy | |
| make verify | |
| - name: Integration Testing | |
| run: | | |
| if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then | |
| chmod +x integrate_test.sh \ | |
| && ./integrate_test.sh ${{github.event.pull_request.head.repo.full_name}} ${{github.event.pull_request.head.sha}} ${{github.base_ref}} | |
| elif [ "$GITHUB_EVENT_NAME" == "push" ]; then | |
| chmod +x integrate_test.sh \ | |
| && ./integrate_test.sh $GITHUB_REPOSITORY $GITHUB_SHA $GITHUB_REF_NAME | |
| else | |
| echo "$GITHUB_EVENT_NAME is an unsupported event type." | |
| exit 1 | |
| fi | |
| - name: Codecov | |
| run: bash <(curl -s https://codecov.io/bash) |