diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.gitea/ISSUE_TEMPLATE/bug_report.md similarity index 100% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .gitea/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/feature-request---enhancement.md b/.gitea/ISSUE_TEMPLATE/feature-request---enhancement.md similarity index 100% rename from .github/ISSUE_TEMPLATE/feature-request---enhancement.md rename to .gitea/ISSUE_TEMPLATE/feature-request---enhancement.md diff --git a/.github/ISSUE_TEMPLATE/question.md b/.gitea/ISSUE_TEMPLATE/question.md similarity index 100% rename from .github/ISSUE_TEMPLATE/question.md rename to .gitea/ISSUE_TEMPLATE/question.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.gitea/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from .github/PULL_REQUEST_TEMPLATE.md rename to .gitea/PULL_REQUEST_TEMPLATE.md diff --git a/.github/dependabot.yml b/.gitea/dependabot.yml similarity index 100% rename from .github/dependabot.yml rename to .gitea/dependabot.yml diff --git a/.gitea/workflows/autoapprove.yml b/.gitea/workflows/autoapprove.yml new file mode 100644 index 00000000..ef43e490 --- /dev/null +++ b/.gitea/workflows/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/automerge.yml b/.gitea/workflows/automerge.yml similarity index 100% rename from .github/workflows/automerge.yml rename to .gitea/workflows/automerge.yml diff --git a/.github/workflows/build.yml b/.gitea/workflows/build.yml similarity index 100% rename from .github/workflows/build.yml rename to .gitea/workflows/build.yml diff --git a/.github/workflows/codecov.yml b/.gitea/workflows/codecov.yml similarity index 100% rename from .github/workflows/codecov.yml rename to .gitea/workflows/codecov.yml diff --git a/.github/workflows/codeql-analysis.yml b/.gitea/workflows/codeql-analysis.yml similarity index 100% rename from .github/workflows/codeql-analysis.yml rename to .gitea/workflows/codeql-analysis.yml diff --git a/.github/workflows/dependabot-automerge.yml b/.gitea/workflows/dependabot-automerge.yml similarity index 100% rename from .github/workflows/dependabot-automerge.yml rename to .gitea/workflows/dependabot-automerge.yml diff --git a/.github/workflows/pr.yml b/.gitea/workflows/pr.yml similarity index 100% rename from .github/workflows/pr.yml rename to .gitea/workflows/pr.yml diff --git a/.github.old/ISSUE_TEMPLATE/bug_report.md b/.github.old/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..1899438a --- /dev/null +++ b/.github.old/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,24 @@ +--- +name: Bug report +about: For reporting bugs in go-micro +title: "[BUG]" +labels: '' +assignees: '' + +--- + +**Describe the bug** + +1. What are you trying to do? +2. What did you expect to happen? +3. What happens instead? + +**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/.github.old/ISSUE_TEMPLATE/feature-request---enhancement.md b/.github.old/ISSUE_TEMPLATE/feature-request---enhancement.md new file mode 100644 index 00000000..459817f4 --- /dev/null +++ b/.github.old/ISSUE_TEMPLATE/feature-request---enhancement.md @@ -0,0 +1,17 @@ +--- +name: Feature request / Enhancement +about: If you have a need not served by go-micro +title: "[FEATURE]" +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github.old/ISSUE_TEMPLATE/question.md b/.github.old/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..1daf48b6 --- /dev/null +++ b/.github.old/ISSUE_TEMPLATE/question.md @@ -0,0 +1,14 @@ +--- +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/.github.old/PULL_REQUEST_TEMPLATE.md b/.github.old/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..cba3cbcc --- /dev/null +++ b/.github.old/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,9 @@ +## Pull Request template +Please, go through these steps before clicking submit on this PR. + +1. Give a descriptive title to your PR. +2. Provide a description of your changes. +3. Make sure you have some relevant tests. +4. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if applicable). + +**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING** diff --git a/.github.old/dependabot.yml b/.github.old/dependabot.yml new file mode 100644 index 00000000..6df9d3f3 --- /dev/null +++ b/.github.old/dependabot.yml @@ -0,0 +1,26 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + commit-message: + prefix: "chore" + include: "scope" + + # Maintain dependencies for Golang + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" + commit-message: + prefix: "chore" + include: "scope" + diff --git a/.github/workflows/autoapprove.yml b/.github.old/workflows/autoapprove.yml similarity index 100% rename from .github/workflows/autoapprove.yml rename to .github.old/workflows/autoapprove.yml diff --git a/.github.old/workflows/automerge.yml b/.github.old/workflows/automerge.yml new file mode 100644 index 00000000..5ff3f699 --- /dev/null +++ b/.github.old/workflows/automerge.yml @@ -0,0 +1,21 @@ +name: "automerge" + +on: + pull_request_target: + types: [assigned, opened, synchronize, reopened] + +permissions: + pull-requests: write + contents: write + +jobs: + automerge: + runs-on: ubuntu-latest + if: github.actor == 'vtolstov' + steps: + - name: merge + id: merge + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.TOKEN}} diff --git a/.github.old/workflows/build.yml b/.github.old/workflows/build.yml new file mode 100644 index 00000000..9603352d --- /dev/null +++ b/.github.old/workflows/build.yml @@ -0,0 +1,47 @@ +name: build +on: + push: + branches: + - master + - v3 +jobs: + test: + name: test + runs-on: ubuntu-latest + steps: + - name: setup + uses: actions/setup-go@v3 + with: + go-version: 1.17 + - name: checkout + uses: actions/checkout@v3 + - name: cache + uses: actions/cache@v3 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + - name: deps + run: go get -v -t -d ./... + - name: test + env: + INTEGRATION_TESTS: yes + run: go test -mod readonly -v ./... + lint: + name: lint + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + - name: lint + uses: golangci/golangci-lint-action@v3.4.0 + continue-on-error: true + with: + # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. + version: v1.30 + # Optional: working directory, useful for monorepos + # working-directory: somedir + # Optional: golangci-lint command line arguments. + # args: --issues-exit-code=0 + # Optional: show only new issues if it's a pull request. The default value is `false`. + # only-new-issues: true diff --git a/.github.old/workflows/codecov.yml b/.github.old/workflows/codecov.yml new file mode 100644 index 00000000..0b3e76f6 --- /dev/null +++ b/.github.old/workflows/codecov.yml @@ -0,0 +1,39 @@ +name: "codecov" + +on: + workflow_run: + workflows: ["build"] + types: + - completed + push: + branches: [ v3 ] + pull_request: + branches: [ v3 ] + schedule: + - cron: '34 1 * * 0' + +jobs: + codecov: + name: codecov + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'go' ] + + steps: + - name: checkout + uses: actions/checkout@v3 + - name: setup + uses: actions/setup-go@v3 + with: + go-version: 1.17 + - name: Run coverage + run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./... + - name: codecov + uses: codecov/codecov-action@v3.1.1 diff --git a/.github.old/workflows/codeql-analysis.yml b/.github.old/workflows/codeql-analysis.yml new file mode 100644 index 00000000..2f6c6dea --- /dev/null +++ b/.github.old/workflows/codeql-analysis.yml @@ -0,0 +1,78 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "codeql" + +on: + workflow_run: + workflows: ["prbuild"] + types: + - completed + push: + branches: [ master, v3 ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master, v3 ] + schedule: + - cron: '34 1 * * 0' + +jobs: + analyze: + name: analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'go' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: checkout + uses: actions/checkout@v3 + - name: setup + uses: actions/setup-go@v3 + with: + go-version: 1.17 + # Initializes the CodeQL tools for scanning. + - name: init + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: analyze + uses: github/codeql-action/analyze@v2 diff --git a/.github.old/workflows/dependabot-automerge.yml b/.github.old/workflows/dependabot-automerge.yml new file mode 100644 index 00000000..f41c1c03 --- /dev/null +++ b/.github.old/workflows/dependabot-automerge.yml @@ -0,0 +1,27 @@ +name: "dependabot-automerge" + +on: + pull_request_target: + types: [assigned, opened, synchronize, reopened] + +permissions: + pull-requests: write + contents: write + +jobs: + automerge: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: metadata + id: metadata + uses: dependabot/fetch-metadata@v1.3.6 + with: + github-token: "${{ secrets.TOKEN }}" + - name: merge + id: merge + if: ${{contains(steps.metadata.outputs.dependency-names, 'go.unistack.org')}} + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.TOKEN}} diff --git a/.github.old/workflows/pr.yml b/.github.old/workflows/pr.yml new file mode 100644 index 00000000..f313ebe8 --- /dev/null +++ b/.github.old/workflows/pr.yml @@ -0,0 +1,47 @@ +name: prbuild +on: + pull_request: + branches: + - master + - v3 +jobs: + test: + name: test + runs-on: ubuntu-latest + steps: + - name: setup + uses: actions/setup-go@v3 + with: + go-version: 1.17 + - name: checkout + uses: actions/checkout@v3 + - name: cache + uses: actions/cache@v3 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + - name: deps + run: go get -v -t -d ./... + - name: test + env: + INTEGRATION_TESTS: yes + run: go test -mod readonly -v ./... + lint: + name: lint + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + - name: lint + uses: golangci/golangci-lint-action@v3.4.0 + continue-on-error: true + with: + # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. + version: v1.30 + # Optional: working directory, useful for monorepos + # working-directory: somedir + # Optional: golangci-lint command line arguments. + # args: --issues-exit-code=0 + # Optional: show only new issues if it's a pull request. The default value is `false`. + # only-new-issues: true