Skip to content

Commit

Permalink
ci: add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Jan 15, 2025
1 parent 0df614e commit d7a3603
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run tests

on:
push:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- uses: actions/checkout@v3

- run: go build -v ./...

- run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest

- name: Run tests
run: |
set -euo pipefail
go test -p 1 -json -v -covermode atomic -coverprofile=cover.out ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
- name: Upload original test log
uses: actions/upload-artifact@v4
if: always()
with:
name: test-log
path: /tmp/gotest.log
if-no-files-found: error

0 comments on commit d7a3603

Please sign in to comment.