Skip to content

Commit

Permalink
chore: add workflow configuration, new tasks, and updated dependencies
Browse files Browse the repository at this point in the history
- Added a new file `.github/dependabot.yml` with some configuration settings for package ecosystems and schedules
- Added a new file `.github/workflows/test.yml` with a workflow configuration for testing
- Modified the file `Taskfile.yml` by adding new tasks and modifying existing ones
- Modified the file `cmd/server/main.go` by changing the version number and contact details
- Modified the file `go.mod` by updating the versions of various dependencies
- Modified the file `internal/server/core/web/index.go` by injecting new modules and configuring the server
- Modified the file `internal/server/modules/v1/repo/statistic.go` by injecting new modules and configuring the repository
- Modified the file `pkg/lib/log/print.go` by adding new logging functions

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed Mar 15, 2024
1 parent 4ae83c4 commit fd8c97c
Show file tree
Hide file tree
Showing 10 changed files with 311 additions and 641 deletions.
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 1
rebase-strategy: disabled
ignore:
- dependency-name: "k8s.io/*"
- dependency-name: "github.com/docker/docker"
labels:
- bot/dependency

- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
open-pull-requests-limit: 1
rebase-strategy: disabled
labels:
- bot/dependency
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: check

env:
# Common versions
GO_VERSION: '1.22'
TZ: Asia/Shanghai


permissions: write-all

on:
push:
branches:
- '*'
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/*.yml'
pull_request:
branches:
- "*"
paths:
- '**.go'

jobs:
build:
name: "build"
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: install task
run: |
echo "install task"
go install github.com/go-task/task/v3/cmd/task@latest
- name: Run task
run: |
echo "Run task"
task
31 changes: 26 additions & 5 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,32 @@

version: '3'

vars:
GREETING: Hello, World!

tasks:
prepare:
desc: Prepare the environment
cmds:
- echo "Preparing the environment"

build_server:
desc: Build the server
cmds:
- echo "Building the server {{.GOOS}} {{.GOARCH}}"

package_gui:
desc: Package the GUI
cmds:
- echo "Packaging the GUI for {{.GOOS}} {{.GOARCH}}"

build_cli:
desc: Build the CLI
cmds:
- echo "Packaging the GUI for {{.GOOS}} {{.GOARCH}}"

default:
cmds:
- echo "{{.GREETING}}"
silent: true
- task: prepare
- task: build_server
vars: {
GOOS: darwin,
GOARCH: arm64
}
2 changes: 1 addition & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var (
)

// @title ZTF服务端API文档
// @version 1.0
// @version 3.x
// @contact.name API Support
// @contact.url https://github.com/easysoft/zentaoatf/issues
// @contact.email [email protected]
Expand Down
112 changes: 56 additions & 56 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,39 @@ require (
github.com/bitly/go-simplejson v0.5.0
github.com/emirpasic/gods v1.18.1
github.com/facebookgo/inject v0.0.0-20180706035515-f23751cae28b
github.com/fatih/color v1.13.0
github.com/fsnotify/fsnotify v1.5.4
github.com/fatih/color v1.16.0
github.com/fsnotify/fsnotify v1.7.0
github.com/glebarez/sqlite v1.10.0
github.com/go-git/go-git/v5 v5.11.0
github.com/go-playground/validator/v10 v10.9.0
github.com/go-redis/redis/v8 v8.11.3
github.com/go-playground/validator/v10 v10.18.0
github.com/gofrs/uuid v4.2.0+incompatible
github.com/gorilla/websocket v1.4.2
github.com/gorilla/websocket v1.5.0
github.com/hashicorp/go-plugin v1.4.9
github.com/iris-contrib/middleware/cors v0.0.0-20210110101738-6d0a4d799b5d
github.com/jameskeane/bcrypt v0.0.0-20120420032655-c3cd44c1e20f
github.com/jinzhu/copier v0.3.5
github.com/kataras/iris/v12 v12.2.0-alpha3
github.com/kataras/neffos v0.0.18
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible
github.com/mattn/go-runewidth v0.0.13
github.com/mattn/go-runewidth v0.0.15
github.com/mholt/archiver/v3 v3.5.0
github.com/otiai10/copy v1.7.0
github.com/otiai10/copy v1.14.0
github.com/ozontech/allure-go/pkg/allure v0.6.4
github.com/ozontech/allure-go/pkg/framework v0.6.18
github.com/playwright-community/playwright-go v0.2000.1
github.com/robfig/cron/v3 v3.0.1
github.com/satori/go.uuid v1.2.0
github.com/sirupsen/logrus v1.9.0
github.com/snowlyg/helper v0.0.0-20210919081922-08e1fd247338
github.com/spf13/viper v1.8.1
github.com/spf13/viper v1.18.2
github.com/tidwall/gjson v1.14.4
go.uber.org/zap v1.21.0
go.uber.org/zap v1.27.0
golang.org/x/text v0.14.0
google.golang.org/grpc v1.38.0
google.golang.org/protobuf v1.30.0
gopkg.in/ini.v1 v1.63.0
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gorm.io/gorm v1.25.5
gorm.io/plugin/dbresolver v1.5.0
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.32.0
gopkg.in/ini.v1 v1.67.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gorm.io/gorm v1.25.7
gorm.io/plugin/dbresolver v1.5.1
)

require (
Expand All @@ -50,20 +48,18 @@ require (
github.com/CloudyKit/jet/v6 v6.1.0 // indirect
github.com/Joker/hpp v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/Shopify/goreferrer v0.0.0-20210630161223-536fa16abd6f // indirect
github.com/ajg/form v1.5.1 // indirect
github.com/andybalholm/brotli v1.0.3 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cloudflare/circl v1.3.6 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 // indirect
Expand All @@ -73,24 +69,26 @@ require (
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/flosch/pongo2/v4 v4.0.2 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gavv/httpexpect/v2 v2.3.1 // indirect
github.com/glebarez/go-sqlite v1.21.2 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/gobwas/httphead v0.0.0-20200921212729-da3d93bc3c58 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.0.4 // indirect
github.com/goccy/go-json v0.7.8 // indirect
github.com/gobwas/ws v1.2.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/hashicorp/go-hclog v0.14.1 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect
github.com/imkira/go-interpol v1.1.0 // indirect
Expand All @@ -107,41 +105,42 @@ require (
github.com/kataras/sitemap v0.0.5 // indirect
github.com/kataras/tunnel v0.0.3 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.13.5 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/klauspost/pgzip v1.2.4 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/lestrrat-go/strftime v1.0.5 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.9 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mediocregopher/radix/v3 v3.6.0 // indirect
github.com/microcosm-cc/bluemonday v1.0.15 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/nats-io/nats-server/v2 v2.7.2 // indirect
github.com/nats-io/nats.go v1.13.1-0.20220121202836-972a071d373d // indirect
github.com/nats-io/nkeys v0.3.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/nats-io/nats.go v1.31.0 // indirect
github.com/nats-io/nkeys v0.4.6 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/nwaples/rardecode v1.1.0 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/pierrec/lz4/v4 v4.0.3 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tdewolff/minify/v2 v2.9.22 // indirect
github.com/tdewolff/parse/v2 v2.5.21 // indirect
github.com/tidwall/match v1.1.1 // indirect
Expand All @@ -160,16 +159,17 @@ require (
github.com/yosssi/ace v0.0.5 // indirect
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
golang.org/x/tools v0.16.1 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.19.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit fd8c97c

Please sign in to comment.