fixed #10
Some checks failed
test-and-lint / test-and-lint (pull_request) Failing after 1m33s
Some checks failed
test-and-lint / test-and-lint (pull_request) Failing after 1m33s
This commit is contained in:
@@ -1,30 +1,33 @@
|
||||
name: Code Quality and Testing
|
||||
name: test-and-lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, 'feature/**', 'bugfix/**', 'chore/**', 'refactor/**' ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test-and-lint:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: go-1.26
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.22'
|
||||
|
||||
- name: Check Go Formatting (gofmt)
|
||||
- name: Check formatting
|
||||
run: |
|
||||
if [ -n "$(gofmt -l .)" ]; then
|
||||
echo "The following files are not properly formatted. Please run 'gofmt -w .'"
|
||||
gofmt -l .
|
||||
files="$(gofmt -l .)"
|
||||
if [ -n "$files" ]; then
|
||||
echo "$files"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Run Unit Tests
|
||||
run: go test -v ./...
|
||||
- name: Check modules
|
||||
run: |
|
||||
go mod tidy
|
||||
git diff --exit-code go.mod go.sum
|
||||
|
||||
- name: Vet
|
||||
run: go vet ./...
|
||||
|
||||
- name: Test
|
||||
run: go test ./...
|
||||
Reference in New Issue
Block a user