Skip to content

Patrick/tamper

Patrick/tamper #24

Workflow file for this run

name: Run Tests
on:
push:
tags:
- v*
branches:
- main
pull_request:
jobs:
build:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/checkout@v3
# Install gotestfmt on the VM running the action.
- name: Set up gotestfmt
uses: haveyoudebuggedit/gotestfmt-action@v2
with:
# Optional: pass GITHUB_TOKEN to avoid rate limiting.
token: ${{ secrets.GITHUB_TOKEN }}
# Run tests with nice formatting. Save the original log in /tmp/gotest.log
- name: Run tests
run: make test-and-cover 2>&1 | tee /tmp/gotest.log | grep '"Time"' | gotestfmt
- name: Install goveralls
env:
GO111MODULE: "off"
run: go get github.com/mattn/goveralls
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=profile.cov -service=github