-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 changed file
with
16 additions
and
21 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,32 +1,27 @@ | ||
on: [push, pull_request] | ||
name: Unit Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go-version: [1.23.x] | ||
go-version: [1.23.x] # Use valid versions | ||
os: [ubuntu-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run Revive Action by pulling pre-built image | ||
uses: docker://morphy/revive-action:v2 | ||
with: | ||
exclude: "./vendor/..." | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Run go fmt | ||
run: go fmt ./... | ||
#run: diff -u <(echo -n) <(gofmt -d -s .) | ||
|
||
- name: Run go vet | ||
run: go vet ./... | ||
- name: Run Test | ||
run: make test | ||
- name: Install Dependencies | ||
run: go mod tidy && go mod download | ||
|
||
- name: Run Tests | ||
run: make test |