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/.github/workflows/autoapprove.yml b/.gitea/workflows/autoapprove.yml similarity index 100% rename from .github/workflows/autoapprove.yml rename to .gitea/workflows/autoapprove.yml 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/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/.gitea/workflows/job_lint.yml b/.gitea/workflows/job_lint.yml new file mode 100644 index 0000000..1a79d20 --- /dev/null +++ b/.gitea/workflows/job_lint.yml @@ -0,0 +1,26 @@ +name: lint + +on: + pull_request: + types: [opened, reopened, synchronize] + branches: + - master + - v3 + - v4 + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: setup-go + uses: actions/setup-go@v5 + with: + go-version: 'stable' + - name: checkout + uses: actions/checkout@v3 + - name: deps + run: go get -v -d ./... + - name: lint + uses: https://github.com/golangci/golangci-lint-action@v6 + with: + version: 'latest' \ No newline at end of file diff --git a/.gitea/workflows/job_test.yml b/.gitea/workflows/job_test.yml new file mode 100644 index 0000000..15716f1 --- /dev/null +++ b/.gitea/workflows/job_test.yml @@ -0,0 +1,31 @@ +name: test + +on: + pull_request: + types: [opened, reopened, synchronize] + branches: + - master + - v3 + - v4 + push: + branches: + - master + - v3 + - v4 + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: setup-go + uses: actions/setup-go@v5 + with: + go-version: 'stable' + - name: checkout + uses: actions/checkout@v3 + - name: deps + run: go get -v -d ./... + - name: test + env: + INTEGRATION_TESTS: yes + run: go test -mod readonly -v ./... diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 9603352..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,47 +0,0 @@ -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/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index f313ebe..0000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,47 +0,0 @@ -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 diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..2bb1c30 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,5 @@ +run: + concurrency: 8 + deadline: 5m + issues-exit-code: 1 + tests: true