From f78bd02b6bbddaaa0aa1a27c626c717b4c7b6d13 Mon Sep 17 00:00:00 2001 From: sergerad Date: Thu, 23 Nov 2023 12:59:49 +1300 Subject: [PATCH] Replace test.yaml --- .github/workflows/{coverage.yaml => pr.yaml} | 10 +++++- .github/workflows/test.yaml | 37 -------------------- README.md | 3 +- 3 files changed, 11 insertions(+), 39 deletions(-) rename .github/workflows/{coverage.yaml => pr.yaml} (88%) delete mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/pr.yaml similarity index 88% rename from .github/workflows/coverage.yaml rename to .github/workflows/pr.yaml index c226a92..aba5212 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/pr.yaml @@ -1,4 +1,4 @@ -name: Generate code coverage badge +name: Test src and generate coverage badge on: pull_request: @@ -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