diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5e17885..70b96ee 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,48 +11,27 @@ jobs: name: Go runs-on: ubuntu-latest steps: - - name: Install go + - name: install-go uses: actions/setup-go@v3 with: go-version: "1.18" - - id: go-cache-paths - run: | - echo "::set-output name=go-build::$(go env GOCACHE)" - echo "::set-output name=go-mod::$(go env GOMODCACHE)" - - - name: Checkout + - name: checkout uses: actions/checkout@v3 - - name: Cache go build - uses: actions/cache@v3 - with: - path: ${{ steps.go-cache-paths.outputs.go-build }} - key: ${{ runner.os }}-go-build - - - name: Cache go modules - uses: actions/cache@v3 - with: - path: ${{ steps.go-cache-paths.outputs.go-mod }} - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-mod- - - - name: install dependencies - run: | - go install github.com/mattn/goveralls@latest + - name: mod-verify + run: go mod verify - - name: lint - run: | - go mod verify - go vet ./... + - name: vet + run: go vet ./... - name: test - run: | - go test -race -covermode atomic -coverprofile=covprofile ./... + run: go test -race -covermode atomic -coverprofile=covprofile ./... + + - name: install-goveralls + run: go install github.com/mattn/goveralls@latest - - name: code-coverage + - name: run-goveralls env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - goveralls -coverprofile=covprofile -service=github + run: goveralls -coverprofile=covprofile -service=github