From d4342611688f32677c49360b8869f742c40dbcbd Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sun, 27 Apr 2025 16:29:22 +0300 Subject: [PATCH] update deps Signed-off-by: Vasiliy Tolstov --- .gitea/ISSUE_TEMPLATE/question.md | 14 ----- .../ISSUE_TEMPLATE/bug_report.md | 8 +-- .../feature-request---enhancement.md | 4 +- .github/ISSUE_TEMPLATE/question.md | 8 +++ {.gitea => .github}/PULL_REQUEST_TEMPLATE.md | 0 .github/autoapprove.yml | 28 ++++++++++ .github/workflows/job_coverage.yml | 54 ++++++++++++++++++ {.gitea => .github}/workflows/job_lint.yml | 8 +-- .github/workflows/job_sync.yml | 56 +++++++++++++++++++ {.gitea => .github}/workflows/job_test.yml | 13 ++--- {.gitea => .github}/workflows/job_tests.yml | 17 +++--- .golangci.yml | 2 +- go.mod | 14 +++-- go.sum | 10 ++++ 14 files changed, 184 insertions(+), 52 deletions(-) delete mode 100644 .gitea/ISSUE_TEMPLATE/question.md rename {.gitea => .github}/ISSUE_TEMPLATE/bug_report.md (64%) rename {.gitea => .github}/ISSUE_TEMPLATE/feature-request---enhancement.md (88%) create mode 100644 .github/ISSUE_TEMPLATE/question.md rename {.gitea => .github}/PULL_REQUEST_TEMPLATE.md (100%) create mode 100644 .github/autoapprove.yml create mode 100644 .github/workflows/job_coverage.yml rename {.gitea => .github}/workflows/job_lint.yml (85%) create mode 100644 .github/workflows/job_sync.yml rename {.gitea => .github}/workflows/job_test.yml (80%) rename {.gitea => .github}/workflows/job_tests.yml (83%) diff --git a/.gitea/ISSUE_TEMPLATE/question.md b/.gitea/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 1daf48b..0000000 --- a/.gitea/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Question -about: Ask a question about go-micro -title: '' -labels: '' -assignees: '' - ---- - -Before asking, please check if your question has already been answered: - -1. Check the documentation - https://micro.mu/docs/ -2. Check the examples and plugins - https://github.com/micro/examples & https://github.com/micro/go-plugins -3. Search existing issues diff --git a/.gitea/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md similarity index 64% rename from .gitea/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/bug_report.md index 1899438..a77fdfd 100644 --- a/.gitea/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: For reporting bugs in go-micro +about: For reporting bugs in micro title: "[BUG]" labels: '' assignees: '' @@ -16,9 +16,3 @@ assignees: '' **How to reproduce the bug:** If possible, please include a minimal code snippet here. - -**Environment:** -Go Version: please paste `go version` output here -``` -please paste `go env` output here -``` diff --git a/.gitea/ISSUE_TEMPLATE/feature-request---enhancement.md b/.github/ISSUE_TEMPLATE/feature-request---enhancement.md similarity index 88% rename from .gitea/ISSUE_TEMPLATE/feature-request---enhancement.md rename to .github/ISSUE_TEMPLATE/feature-request---enhancement.md index 459817f..c722ea6 100644 --- a/.gitea/ISSUE_TEMPLATE/feature-request---enhancement.md +++ b/.github/ISSUE_TEMPLATE/feature-request---enhancement.md @@ -1,6 +1,6 @@ --- name: Feature request / Enhancement -about: If you have a need not served by go-micro +about: If you have a need not served by micro title: "[FEATURE]" labels: '' assignees: '' @@ -14,4 +14,4 @@ A clear and concise description of what the problem is. Ex. I'm always frustrate A clear and concise description of what you want to happen. **Additional context** -Add any other context or screenshots about the feature request here. +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 0000000..3d65c72 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,8 @@ +--- +name: Question +about: Ask a question about micro +title: '' +labels: '' +assignees: '' + +--- \ No newline at end of file diff --git a/.gitea/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from .gitea/PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/autoapprove.yml b/.github/autoapprove.yml new file mode 100644 index 0000000..ef43e49 --- /dev/null +++ b/.github/autoapprove.yml @@ -0,0 +1,28 @@ +name: "autoapprove" + +on: + pull_request_target: + types: [assigned, opened, synchronize, reopened] + workflow_run: + workflows: ["prbuild"] + types: + - completed + +permissions: + pull-requests: write + contents: write + +jobs: + autoapprove: + runs-on: ubuntu-latest + steps: + - name: approve + run: [ "curl -o tea https://dl.gitea.com/tea/main/tea-main-linux-amd64", + "chmod +x ./tea", + "./tea login add --name unistack --token ${{ secrets.GITHUB_TOKEN }} --url https://git.unistack.org", + "./tea pr --repo ${{ github.event.repository.name }}" + ] + if: github.actor == 'vtolstov' + id: approve + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/job_coverage.yml b/.github/workflows/job_coverage.yml new file mode 100644 index 0000000..a311fa7 --- /dev/null +++ b/.github/workflows/job_coverage.yml @@ -0,0 +1,54 @@ +name: coverage + +on: + push: + branches: [ main, v3, v4 ] + paths-ignore: + - '.github/**' + - '.gitea/**' + pull_request: + branches: [ main, v3, v4 ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v4 + with: + filter: 'blob:none' + + - name: setup go + uses: actions/setup-go@v5 + with: + cache-dependency-path: "**/*.sum" + go-version: 'stable' + + - name: test coverage + run: | + go test -v -cover ./... -covermode=count -coverprofile coverage.out -coverpkg ./... + go tool cover -func coverage.out -o coverage.out + + - name: coverage badge + uses: tj-actions/coverage-badge-go@v2 + with: + green: 80 + filename: coverage.out + + - uses: stefanzweifel/git-auto-commit-action@v4 + name: autocommit + with: + commit_message: Apply Code Coverage Badge + skip_fetch: true + skip_checkout: true + file_pattern: ./README.md + + - name: push + if: steps.auto-commit-action.outputs.changes_detected == 'true' + uses: ad-m/github-push-action@master + with: + github_token: ${{ github.token }} + branch: ${{ github.ref }} \ No newline at end of file diff --git a/.gitea/workflows/job_lint.yml b/.github/workflows/job_lint.yml similarity index 85% rename from .gitea/workflows/job_lint.yml rename to .github/workflows/job_lint.yml index d97e747..4692f59 100644 --- a/.gitea/workflows/job_lint.yml +++ b/.github/workflows/job_lint.yml @@ -3,10 +3,10 @@ name: lint on: pull_request: types: [opened, reopened, synchronize] - branches: - - master - - v3 - - v4 + branches: [ master, v3, v4 ] + paths-ignore: + - '.github/**' + - '.gitea/**' jobs: lint: diff --git a/.github/workflows/job_sync.yml b/.github/workflows/job_sync.yml new file mode 100644 index 0000000..06bd7f7 --- /dev/null +++ b/.github/workflows/job_sync.yml @@ -0,0 +1,56 @@ +name: sync + +on: + schedule: + - cron: '* * * * *' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + sync: + if: env.GITHUB_ACTION == 0 + runs-on: ubuntu-latest + steps: + - name: init + run: | + git config --global user.email "vtolstov " + git config --global user.name "github-actions[bot]" + echo "machine git.unistack.org login vtolstov password ${{ secrets.TOKEN_GITEA }}" | tee -a /root/.netrc + echo "machine github.com login vtolstov password ${{ secrets.TOKEN_GITHUB }}" | tee -a /root/.netrc + env + + - name: track master + run: | + git clone --depth=10 --branch master --single-branch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} repo + cd repo + git remote add --no-tags --fetch --track master upstream https://github.com/${GITHUB_REPOSITORY} + git pull --rebase upstream master + git push upstream master --progress + git merge --allow-unrelated-histories "upstream/master" + git push origin master --progress + cd ../ + rm -rf repo + + - name: track v3 + run: | + git clone --depth=10 --branch v3 --single-branch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} repo + cd repo + git remote add --no-tags --fetch --track v3 upstream https://github.com/${GITHUB_REPOSITORY} + git pull --rebase upstream v3 + git push upstream v3 + git merge --allow-unrelated-histories "upstream/v3" + git push origin v3 --progress + cd ../ + rm -rf repo + + - name: track v4 + run: | + git clone --depth=10 --branch v4 --single-branch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} repo + cd repo + git remote add --no-tags --fetch --track v4 upstream https://github.com/${GITHUB_REPOSITORY} + git pull --rebase upstream v4 + git push upstream v4 + git merge --allow-unrelated-histories "upstream/v4" + git push origin v4 --progress + cd ../ + rm -rf repo diff --git a/.gitea/workflows/job_test.yml b/.github/workflows/job_test.yml similarity index 80% rename from .gitea/workflows/job_test.yml rename to .github/workflows/job_test.yml index f68cbca..59a95ae 100644 --- a/.gitea/workflows/job_test.yml +++ b/.github/workflows/job_test.yml @@ -3,15 +3,12 @@ name: test on: pull_request: types: [opened, reopened, synchronize] - branches: - - master - - v3 - - v4 + branches: [ master, v3, v4 ] push: - branches: - - master - - v3 - - v4 + branches: [ master, v3, v4 ] + paths-ignore: + - '.github/**' + - '.gitea/**' jobs: test: diff --git a/.gitea/workflows/job_tests.yml b/.github/workflows/job_tests.yml similarity index 83% rename from .gitea/workflows/job_tests.yml rename to .github/workflows/job_tests.yml index e911576..35d6225 100644 --- a/.gitea/workflows/job_tests.yml +++ b/.github/workflows/job_tests.yml @@ -3,15 +3,12 @@ name: test on: pull_request: types: [opened, reopened, synchronize] - branches: - - master - - v3 - - v4 + branches: [ master, v3, v4 ] push: - branches: - - master - - v3 - - v4 + branches: [ master, v3, v4 ] + paths-ignore: + - '.github/**' + - '.gitea/**' jobs: test: @@ -39,7 +36,7 @@ jobs: run: | go work init go work use . - go work use micro-tests + go work use micro-tests - name: setup deps env: GOWORK: /workspace/${{ github.repository_owner }}/go.work @@ -50,4 +47,4 @@ jobs: GOWORK: /workspace/${{ github.repository_owner }}/go.work run: | cd micro-tests - go test -mod readonly -v ./... || true + go test -mod readonly -v ./... || true diff --git a/.golangci.yml b/.golangci.yml index 2bb1c30..c6a7985 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,5 @@ run: concurrency: 8 - deadline: 5m + timeout: 5m issues-exit-code: 1 tests: true diff --git a/go.mod b/go.mod index 6879b39..733ad9f 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,10 @@ module go.unistack.org/micro-client-http/v4 -go 1.22.0 +go 1.23.0 -require go.unistack.org/micro/v4 v4.1.2 +toolchain go1.24.2 + +require go.unistack.org/micro/v4 v4.1.7 require ( github.com/ash3in/uuidv8 v1.2.0 // indirect @@ -10,10 +12,10 @@ require ( github.com/matoous/go-nanoid v1.5.1 // indirect github.com/spf13/cast v1.7.1 // indirect go.unistack.org/micro-proto/v4 v4.1.0 // indirect - golang.org/x/sys v0.30.0 // indirect + golang.org/x/sys v0.32.0 // indirect golang.org/x/text v0.22.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241216192217-9240e9c98484 // indirect - google.golang.org/grpc v1.69.4 // indirect - google.golang.org/protobuf v1.36.3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197 // indirect + google.golang.org/grpc v1.72.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index a4045cc..aed22b0 100644 --- a/go.sum +++ b/go.sum @@ -24,18 +24,28 @@ go.unistack.org/micro-proto/v4 v4.1.0 h1:qPwL2n/oqh9RE3RTTDgt28XK3QzV597VugQPaw9 go.unistack.org/micro-proto/v4 v4.1.0/go.mod h1:ArmK7o+uFvxSY3dbJhKBBX4Pm1rhWdLEFf3LxBrMtec= go.unistack.org/micro/v4 v4.1.2 h1:9SOlPYyPNNFpg1A7BsvhDyQm3gysLH1AhWbDCp1hyoY= go.unistack.org/micro/v4 v4.1.2/go.mod h1:lr3oYED8Ay1vjK68QqRw30QOtdk/ffpZqMFDasOUhKw= +go.unistack.org/micro/v4 v4.1.7 h1:4/dSEMTqxYoHimn/8wKDohfTXi2zDy6eWXYBCnBaZdc= +go.unistack.org/micro/v4 v4.1.7/go.mod h1:lr3oYED8Ay1vjK68QqRw30QOtdk/ffpZqMFDasOUhKw= golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= google.golang.org/genproto/googleapis/rpc v0.0.0-20241216192217-9240e9c98484 h1:Z7FRVJPSMaHQxD0uXU8WdgFh8PseLM8Q8NzhnpMrBhQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20241216192217-9240e9c98484/go.mod h1:lcTa1sDdWEIHMWlITnIczmw5w60CF9ffkb8Z+DVmmjA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197 h1:29cjnHVylHwTzH66WfFZqgSQgnxzvWE+jvBwpZCLRxY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM= +google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=