Merge pull request #74 from walnuts1018/renovate/docker-login-action-3.x #296
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: Go Tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
cache: true | |
cache-dependency-path: go.sum | |
- name: go mod download | |
run: go mod download | |
- name: Test | |
run: | | |
go test -cover ./... -coverprofile="cover.out" | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: cover.out | |
fail_ci_if_error: false | |
verbose: true | |
status-check: | |
runs-on: ubuntu-latest | |
needs: [test] | |
if: failure() | |
steps: | |
- run: exit 1 |