Skip to content

Merge pull request #212 from hashicorp/dependabot/github_actions/acti… #270

Merge pull request #212 from hashicorp/dependabot/github_actions/acti…

Merge pull request #212 from hashicorp/dependabot/github_actions/acti… #270

Workflow file for this run

name: build
on:
push:
branches: [main]
tags: ["*"]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: set up go 1.19
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version: 1.19
id: go
- name: checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: build, test and generate coverage report
run: |
go test -timeout=60s -race -v ./... -coverprofile=coverage.out
go build -race ./...
- name: build and test ARC
working-directory: ./arc
run: |
go test -timeout=60s -race
go build -race
- name: Upload the coverage report
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
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
- name: run golangci-lint
run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions ./... ./simplelru/... ./expirable/...
- name: run golangci-lint on ARC
working-directory: ./arc
run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions ./...