Skip to content
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

ci: Update golang-ci linter and explicit go-setup to use v1.17 #331

Merged
merged 4 commits into from
Apr 5, 2022
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
7 changes: 4 additions & 3 deletions .github/workflows/code-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: '1.17.5'
go-version: '1.17'
check-latest: true

- name: Generate full test coverage report using go-acc
run: make test:coverage-full
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/lint-then-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,24 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Check out code into the directory
uses: actions/checkout@v2
- name: Checkout code into the directory
uses: actions/checkout@v3

# Setting up Go explicitly is required for v3.0.0+ of golangci/golangci-lint-action.
- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: '1.17'
check-latest: true

- name: Run the golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3

with:
# Required: the version of golangci-lint is required.
# Note: The version should not pick the patch version as the latest patch
# version is what will always be used.
version: v1.44
version: latest

# Optional: working directory, useful for monorepos or if we wanted to run this
# on a non-root directory.
Expand All @@ -74,7 +81,7 @@ jobs:
# =================== Step-2: Decide what type of benchmarks to run based on label(s).
# This job acts like a switch to simplify our ci control flow later on.
decide-benchmark-type:
name: Deciding which benchmarks to run based on flags
name: Decide which benchmarks to run based on flags
strategy:
matrix:
os: [ubuntu-latest]
Expand Down Expand Up @@ -173,7 +180,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run the full bechmarking suite
if: needs.decide-benchmark-type.outputs.benchmark-type == 'FULL'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dump: build

.PHONY: deps\:lint
deps\:lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOPATH}/bin v1.44.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOPATH}/bin latest
orpheuslummis marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: deps\:go-acc
deps\:go-acc:
Expand Down