Skip to content

Add GitHub Actions testing workflow #2

Add GitHub Actions testing workflow

Add GitHub Actions testing workflow #2

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: ./go.mod
check-latest: true
cache: true
- name: Build
run: go build ./...
- name: Vet
run: go vet ./...
- name: Test
run: go test -race -coverprofile=coverage.out -coverpkg=./... ./...
- name: Generate Coverage Report
run: go tool cover -html=coverage.out -o=coverage.html
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: coverage.html
path: coverage.html
- name: ShellCheck
run: shellcheck scripts/install.sh