Skip to content

Merge pull request #67 from chezmoi-sh/add-password-hash #13

Merge pull request #67 from chezmoi-sh/add-password-hash

Merge pull request #67 from chezmoi-sh/add-password-hash #13

name: Test code (Go)
on:
merge_group: {}
pull_request:
paths:
- "**/*.go"
- go.mod
- go.sum
- .github/workflows/pull_request,push.go.test.yaml
push:
branches: [main]
permissions: read-all
jobs:
test:
name: Go test
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [1.21]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # renovate: tag=v5.0.0
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
- uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4.0.1
env:
OS: ${{ matrix.os }}
GO_VERSION: ${{ matrix.go }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
env_vars: GO_VERSION
fail_ci_if_error: true
flags: unittests
verbose: true