Skip to content

[chore] : Bump actions/checkout from 6.0.0 to 7.0.0 (#98) #107

[chore] : Bump actions/checkout from 6.0.0 to 7.0.0 (#98)

[chore] : Bump actions/checkout from 6.0.0 to 7.0.0 (#98) #107

Workflow file for this run

name: Run CI Tests
on: [push]
env:
GO_VERSION: 1.18.4
jobs:
run-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{env.GO_VERSION}}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5
- name: Run Go Vet
run: |
go vet ./...
- name: Run Go Fmt
run: |
files=$(go fmt ./...)
if [ -n "$files" ]; then
echo "Please run gofmt on these files ..."
echo "$files"
exit 1
fi
- name: Run Go Test and generate coverage report
run: |
go test -race -v ./... -coverprofile=coverage.out
- name: Upload coverage report
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
path: coverage.out
name: Coverage-report
- name: Display coverage report
run: go tool cover -func=coverage.out
- name: Build Go
run: go build ./...