Skip to content

IND-2336 ci.yml updated with unit test coverage, .go-version added #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: build

on:
push:
branches:
tags:
branches: [main]
tags: ["*"]
pull_request:
branches: [main]

jobs:
build:
Expand All @@ -20,9 +21,9 @@ jobs:
- name: checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- name: build and test
- name: build, test and generate coverage report
run: |
go test -timeout=60s -race ./...
go test -timeout=60s -race -v ./... -coverprofile=coverage.out
go build -race ./...

- name: build and test ARC
Expand All @@ -31,6 +32,15 @@ jobs:
go test -timeout=60s -race
go build -race

- name: Upload the coverage report
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
path: coverage.out
name: Coverage-report

- name: Display the coverage report
run: go tool cover -func=coverage.out

- name: install golangci-lint
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.53.3

Expand Down
1 change: 1 addition & 0 deletions .go-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.19
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/hashicorp/golang-lru/v2

go 1.18
go 1.19