fix: handle missing index files during closed segment recovery #10
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] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Test | |
| run: go test -race -coverprofile=coverage.out -covermode=atomic ./pkg/... | |
| - name: Coverage gate | |
| run: | | |
| COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | tr -d '%') | |
| echo "Coverage: ${COVERAGE}%" | |
| if [ "$(echo "${COVERAGE} < 77" | bc -l)" -eq 1 ]; then | |
| echo "Coverage ${COVERAGE}% is below 77% threshold" | |
| exit 1 | |
| fi | |
| - name: Upload coverage | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: coverage.out |