Skip to content

Commit

Permalink
hashutil add test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtwinkle committed Mar 25, 2024
1 parent fdf1636 commit f3e011b
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/test-hashutil.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test hashutil

on:
push:
branches:
- main
paths:
- "hashutil/**"
pull_request:
types:
- opened
- synchronize
- reopened
paths:
- "hashutil/**"
env:
testdir : ./hashutil

jobs:
test:
strategy:
matrix:
go-version: [ 1.22.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
timeout-minutes: 5
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v4

- name: Go Module Download
working-directory: ${{ env.testdir }}
run: |
go install gotest.tools/gotestsum@latest
go mod download
- name: Test
working-directory: ${{ env.testdir }}
timeout-minutes: 3
run: |
# shellcheck disable=SC2046
gotestsum --junitfile unit-tests.xml -- -v ./... -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./...
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ env.testdir }}/coverage.txt

0 comments on commit f3e011b

Please sign in to comment.