Enhance Rename service with detailed documentation and validation checks #134
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: | |
| - '**' | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: [1.21.x, 1.22.x] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache: true | |
| - name: Download dependencies | |
| run: go mod download | |
| working-directory: ./sourcecontrol | |
| - name: Verify dependencies | |
| run: go mod verify | |
| working-directory: ./sourcecontrol | |
| - name: Run go vet | |
| run: go vet ./... | |
| working-directory: ./sourcecontrol | |
| - name: Run go fmt check | |
| run: | | |
| if [ -n "$(gofmt -l .)" ]; then | |
| echo "Go files must be formatted with gofmt. Please run:" | |
| echo " gofmt -w ." | |
| exit 1 | |
| fi | |
| working-directory: ./sourcecontrol | |
| - name: Run tests | |
| run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./... | |
| working-directory: ./sourcecontrol | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./sourcecontrol/coverage.out | |
| flags: unittests | |
| continue-on-error: true |