-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Go (1.21) and all dependencies
- Loading branch information
Showing
5 changed files
with
30 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
name: CI | ||
on: push | ||
env: | ||
GO_VERSION: '1.19' | ||
GO_VERSION: '1.21' | ||
STATIC_CHECK_VERSION: '2023.1.6' | ||
COUNT_LOC_DOCKER_IMAGE: 'aldanial/cloc:1.98' | ||
jobs: | ||
statistics: | ||
name: Statistics | ||
runs-on: ubuntu-latest | ||
env: | ||
TARGET: klog/ | ||
TEST_FILE_PATTERN: .*_test\.go | ||
IMAGE_NAME: aldanial/cloc:1.90 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Prepare tooling | ||
run: docker pull "${IMAGE_NAME}" | ||
run: docker pull "${COUNT_LOC_DOCKER_IMAGE}" | ||
- name: LOC of source files | ||
run: docker run --rm -v $(pwd):/wdir:ro -w /wdir "${IMAGE_NAME}" --not-match-f="${TEST_FILE_PATTERN}" "${TARGET}" | ||
run: docker run --rm -v $(pwd):/wdir:ro -w /wdir "${COUNT_LOC_DOCKER_IMAGE}" --not-match-f="${TEST_FILE_PATTERN}" "${TARGET}" | ||
- name: LOC of test files | ||
run: docker run --rm -v $(pwd):/wdir:ro -w /wdir "${IMAGE_NAME}" --match-f="${TEST_FILE_PATTERN}" "${TARGET}" | ||
run: docker run --rm -v $(pwd):/wdir:ro -w /wdir "${COUNT_LOC_DOCKER_IMAGE}" --match-f="${TEST_FILE_PATTERN}" "${TARGET}" | ||
benchmark: | ||
name: Benchmark | ||
runs-on: ubuntu-latest | ||
|
@@ -45,13 +46,11 @@ jobs: | |
source ./run.sh | ||
dirty_files="$(run::format)" | ||
if [[ "${dirty_files}" != "" ]]; then $(exit 1); fi | ||
- name: Run vet | ||
run: go vet ./... | ||
- name: Run staticcheck | ||
uses: dominikh/[email protected] | ||
with: | ||
version: "2022.1.3" | ||
install-go: false | ||
- name: Run linters | ||
run: | | ||
go install "honnef.co/go/tools/cmd/staticcheck@${STATIC_CHECK_VERSION}" | ||
source ./run.sh | ||
run::lint | ||
test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
# Install all dependencies | ||
run::install() { | ||
go get -t ./... | ||
go mod tidy | ||
} | ||
|
||
# Compile to ./out/klog | ||
|