Skip to content

Build test

Build test #55

Workflow file for this run

name: ci
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
tags: ["*"]
permissions:
contents: read
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: '1.20'
- name: Run golangci-lint
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0
with:
version: latest
skip-cache: true
- name: Run Go tests and generate coverage report
run: go test -v -race ./... -coverprofile=coverage.out
- name: Upload the coverage report
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
path: coverage.out
name: Coverage-report
- name: Display Coverage Report
run: go tool cover -func=coverage.out
- name: Build Go
run: go build ./...