-
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.
- Loading branch information
Showing
6 changed files
with
164 additions
and
30 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
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,33 @@ | ||
name: Build | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
|
||
build_go: | ||
name: "🏗 Compile" | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🛒 Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: 🚀 Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: '1.23' | ||
cache: true | ||
check-latest: true | ||
|
||
- name: 🧹 Tidy | ||
run: go mod tidy | ||
|
||
- name: 🤖 Build | ||
run: go build . |
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,52 @@ | ||
name: Lint | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
|
||
lint-markdown: | ||
|
||
name: "🧹 Markdown" | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🛒 Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: 📦 Install Node.js and npm | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.0.0' | ||
|
||
- name: 📚 Install markdownlint-cli | ||
run: npm install -g markdownlint-cli | ||
|
||
- name: 🖊️ Run markdownlint | ||
run: find . -name '*.md' -exec markdownlint {} + | ||
|
||
lint_go: | ||
name: "️️🕵️ Golang" | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🛒 Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: 🚀 Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: '1.23' | ||
cache: true | ||
check-latest: true | ||
|
||
- name: 🕵️♂️ Run GolangCI-Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.54 |
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,41 @@ | ||
name: Test | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
build: | ||
name: 🧪 Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.23 | ||
|
||
- name: Set up gotestfmt | ||
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | ||
|
||
# Run tests with nice formatting. Save the original log in /tmp/gotest.log | ||
- name: 🧪 Execute Tests | ||
run: | | ||
set -euo pipefail | ||
go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
# Upload the original go test log as an artifact for later review. | ||
- name: Upload test log | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: test-log | ||
path: /tmp/gotest.log | ||
if-no-files-found: error |
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