This commit is contained in:
parent
f8b9c4f748
commit
3d77945981
3 changed files with 37 additions and 2 deletions
30
.gitea/workflows/test.yml
Normal file
30
.gitea/workflows/test.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Test Project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: [moon, amd64]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get install -y task
|
||||
|
||||
- name: Run tests
|
||||
run: task test
|
|
@ -6,4 +6,9 @@ tasks:
|
|||
docs:
|
||||
cmds:
|
||||
- swag i --parseDependency --dir api
|
||||
silent: true
|
||||
silent: false
|
||||
test:
|
||||
cmds:
|
||||
- go mod tidy
|
||||
- go test -v ./...
|
||||
silent: false
|
||||
|
|
|
@ -75,7 +75,7 @@ func (np *NodesProcessor) Dump() error {
|
|||
return true
|
||||
})
|
||||
|
||||
body, err := json.Marshal(ns)
|
||||
body, err := json.MarshalIndent(ns, "", " ")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshal nodes: %w", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue