diff --git a/.github/workflows/coverage.yaml b/.github/workflows/pr.yaml similarity index 90% rename from .github/workflows/coverage.yaml rename to .github/workflows/pr.yaml index c226a92..dc18a00 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/pr.yaml @@ -21,6 +21,14 @@ jobs: with: go-version-file: 'go.mod' + - name: Run lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.55 + + - name: Go build + run: go build -v ./... + - name: Run Test run: | go test -v ./... -covermode=count -coverprofile=coverage.out diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index 5b0d096..0000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build and Test - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - - test: - name: Test - runs-on: ubuntu-latest - steps: - - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: 1.21.x - - - name: Checkout src - uses: actions/checkout@v2 - - - name: Go get - run: | - go get -v -t -d ./... - - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.55 - - - name: Go build - run: go build -v . - - - name: Go test - run: go test -v . diff --git a/README.md b/README.md index e2ecf10..2029957 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # Relax -![Coverage](https://img.shields.io/badge/Coverage-100.0%25-brightgreen) #### *...there's no need to panic.* +![Coverage](https://img.shields.io/badge/Coverage-100.0%25-brightgreen) + In some situations, encountering a panic can be problematic. For example: * If your REST server panics while handling a POST request, you may end up with a dangling resource in your database; * Applications that write state to filesystems may produce irrecoverable state if a series of dependant file writes is interrupted by a panic; and