-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to `tmpl-go` version 0.12.0 [1], including the versions in between starting from 0.7.0 [3]: 1. Updated to Go 1.17 [4]. 2. Updated to golangci-lint `v1.43.0` [5]. 3. Updated to `tmpl` template repository version `0.11.0` [6]. 4. Optimized GitHub action workflows for Go and Node [7]. 5. Disabled golangci-lint's default excluded issues [8]. 6. Introduced Go dependency caching and build outputs in `ci-go` workflow [9]. 7. Disabled revive linter rule `package-comments` [10]. 8. Fixed golangci-lint fail to run due to `revives` unknown `time-equal` rule [11]. 9. updated Node.js packages & GitHub actions [12]. This also included changes required for any linter matches. [1]: https://github.com/svengreb/tmpl-go/releases/tag/v0.12.0 [3]: https://github.com/svengreb/tmpl-go/releases/tag/v0.7.0 [4]: svengreb/tmpl-go#66 [5]: svengreb/tmpl-go#64 [6]: svengreb/tmpl-go#91 [7]: svengreb/tmpl-go#68 [8]: svengreb/tmpl-go#72 [9]: svengreb/tmpl-go#74 [10]: svengreb/tmpl-go#78 [11]: svengreb/tmpl-go#76 [12]: svengreb/tmpl-go#42 GH-62
- Loading branch information
Showing
32 changed files
with
10,432 additions
and
2,752 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,9 +1,14 @@ | ||
# Copyright (c) 2020-present Sven Greb <[email protected]> | ||
# This source code is licensed under the MIT license found in the LICENSE file. | ||
|
||
# Configurations for EditorConfig. | ||
# See https://editorconfig.org/#file-format-details for more details. | ||
|
||
# +--------------------+ | ||
# + Base Configuration + | ||
# +--------------------+ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
|
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -4,17 +4,21 @@ | |
# GitHub Action Workflow for continuous integration jobs. | ||
# See https://docs.github.com/en/actions and https://github.com/features/actions for more details. | ||
|
||
name: ci | ||
name: ci-go | ||
on: | ||
push: | ||
paths: | ||
- "**.go" | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
pull_request: | ||
paths: | ||
- "**.go" | ||
|
||
jobs: | ||
lint-node: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Print metadata and context information | ||
|
@@ -24,38 +28,20 @@ jobs: | |
echo "Workflow Actor: $GITHUB_ACTOR" | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: "Setup Node.js version ${{ matrix.node-version }}" | ||
uses: actions/[email protected] | ||
with: | ||
node-version: "14.x" | ||
- name: Install Node modules | ||
run: yarn --frozen-lockfile | ||
- name: Run linters | ||
run: yarn lint | ||
lint-go: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Print metadata and context information | ||
run: | | ||
echo "Git SHA: $GITHUB_SHA" | ||
echo "Git Ref: $GITHUB_REF" | ||
echo "Workflow Actor: $GITHUB_ACTOR" | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Install Go | ||
- name: Install Go 1.17 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.15.x" | ||
go-version: "1.17.x" | ||
- name: "Run golangci-lint" | ||
# The official golangci-lint action created and maintained by the golangci-lint project. | ||
# See https://github.com/golangci/golangci-lint-action for more details. | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.32 | ||
version: v1.43 | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint-go | ||
- lint | ||
steps: | ||
- name: Print metadata and context information | ||
run: | | ||
|
@@ -64,9 +50,27 @@ jobs: | |
echo "Workflow Actor: $GITHUB_ACTOR" | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Install Go | ||
with: | ||
# Ensure to fetch all history for all tags and branches for other steps, e.g. when bootstrapping the tools, | ||
# otherwise this can result in errors when trying to query for repository metadata like the tag. | ||
# See https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches for more details. | ||
fetch-depth: 0 | ||
- name: Install Go 1.17 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.15.x" | ||
- name: "Run tests with coverage and race detector" | ||
run: go test -cover -race -v ./... | ||
go-version: "1.17.x" | ||
- name: Bootstrap tools | ||
run: go run make.go bootstrap | ||
- name: Cache Go dependencies and build outputs | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Run unit tests with coverage and race detector | ||
run: go run make.go testCover testRace | ||
- name: Run integration tests | ||
run: go run make.go testIntegration |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Copyright (c) 2020-present Sven Greb <[email protected]> | ||
# This source code is licensed under the MIT license found in the LICENSE file. | ||
|
||
# GitHub Action Workflow for continuous integration jobs. | ||
# See https://docs.github.com/en/actions and https://github.com/features/actions for more details. | ||
|
||
name: ci-node | ||
on: | ||
push: | ||
paths: | ||
- "**.js" | ||
- "**.json" | ||
- "**.md" | ||
- "**.yaml" | ||
- "**.yml" | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
pull_request: | ||
paths: | ||
- "**.js" | ||
- "**.json" | ||
- "**.md" | ||
- "**.yaml" | ||
- "**.yml" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Print metadata and context information | ||
run: | | ||
echo "Git SHA: $GITHUB_SHA" | ||
echo "Git Ref: $GITHUB_REF" | ||
echo "Workflow Actor: $GITHUB_ACTOR" | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node.js version 16 | ||
uses: actions/[email protected] | ||
with: | ||
node-version: "16" | ||
cache: "npm" | ||
- name: Install Node modules | ||
run: npm ci | ||
- name: Run linters in CI/CD mode | ||
run: npm run lint:ci |
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,7 +1,7 @@ | ||
# Copyright (c) 2020-present Sven Greb <[email protected]> | ||
# This source code is licensed under the MIT license found in the LICENSE file. | ||
|
||
# Configuration to specify paths to ignore. | ||
# Path match pattern to intentionally ignore untracked files and directories. | ||
# See https://git-scm.com/docs/gitignore for more details. | ||
|
||
# +--------------------+ | ||
|
@@ -17,9 +17,6 @@ | |
# + Node.js + | ||
# +---------+ | ||
**/node_modules/ | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.yarn-integrity | ||
|
||
# +-------------------+ | ||
# + Project Structure + | ||
|
Oops, something went wrong.