Skip to content

Install and configure golangci-lint (#118) #33

Install and configure golangci-lint (#118)

Install and configure golangci-lint (#118) #33

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.20', '1.21', '1.22']
env:
VERBOSE: 1
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v .
- name: Run tests with GITHUB_STEP_SUMMARY
# Note the use of || true. This so the job doesn't fail at that line. We want to preserve -follow
# as part of the test output, but not output it to the summary page, which is done in the proceeding
# command when we parse the output.jsonl file.
run: |
go test -v -count=1 -race ./... -json -coverpkg github.com/mfridman/tparse/parse \
| tee output.jsonl | ./tparse -notests -follow -all || true
./tparse -format markdown -file output.jsonl -all -slow 20 > $GITHUB_STEP_SUMMARY
- name: Run tparse w/ std lib
run: go test -count=1 fmt strings bytes bufio crypto log mime sort time -json -cover | ./tparse -follow -all