From e970e52eea0a3bf7242fd854732fa301a5403074 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 19 Oct 2023 11:41:16 +0300 Subject: [PATCH 1/3] [#96] .forgejo: Move workflows folder from .github Signed-off-by: Evgenii Stratonikov --- {.github => .forgejo}/CODEOWNERS | 0 {.github => .forgejo}/ISSUE_TEMPLATE/bug_report.md | 0 {.github => .forgejo}/ISSUE_TEMPLATE/config.yml | 0 {.github => .forgejo}/ISSUE_TEMPLATE/feature_request.md | 0 {.github => .forgejo}/logo.svg | 0 {.github => .forgejo}/workflows/dco.yml | 0 {.github => .forgejo}/workflows/go.yml | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename {.github => .forgejo}/CODEOWNERS (100%) rename {.github => .forgejo}/ISSUE_TEMPLATE/bug_report.md (100%) rename {.github => .forgejo}/ISSUE_TEMPLATE/config.yml (100%) rename {.github => .forgejo}/ISSUE_TEMPLATE/feature_request.md (100%) rename {.github => .forgejo}/logo.svg (100%) rename {.github => .forgejo}/workflows/dco.yml (100%) rename {.github => .forgejo}/workflows/go.yml (100%) diff --git a/.github/CODEOWNERS b/.forgejo/CODEOWNERS similarity index 100% rename from .github/CODEOWNERS rename to .forgejo/CODEOWNERS diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.forgejo/ISSUE_TEMPLATE/bug_report.md similarity index 100% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .forgejo/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.forgejo/ISSUE_TEMPLATE/config.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/config.yml rename to .forgejo/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.forgejo/ISSUE_TEMPLATE/feature_request.md similarity index 100% rename from .github/ISSUE_TEMPLATE/feature_request.md rename to .forgejo/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/logo.svg b/.forgejo/logo.svg similarity index 100% rename from .github/logo.svg rename to .forgejo/logo.svg diff --git a/.github/workflows/dco.yml b/.forgejo/workflows/dco.yml similarity index 100% rename from .github/workflows/dco.yml rename to .forgejo/workflows/dco.yml diff --git a/.github/workflows/go.yml b/.forgejo/workflows/go.yml similarity index 100% rename from .github/workflows/go.yml rename to .forgejo/workflows/go.yml -- 2.45.2 From 27db0ac9430ca010b70ba9b2366486db434dd91d Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 19 Oct 2023 11:41:44 +0300 Subject: [PATCH 2/3] [#96] .forgejo: Fix DCO action Signed-off-by: Evgenii Stratonikov --- .forgejo/workflows/dco.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.forgejo/workflows/dco.yml b/.forgejo/workflows/dco.yml index 023773d..6746408 100644 --- a/.forgejo/workflows/dco.yml +++ b/.forgejo/workflows/dco.yml @@ -1,21 +1,21 @@ -name: DCO check - -on: - pull_request: - branches: - - master +name: DCO action +on: [pull_request] jobs: - commits_check_job: + dco: + name: DCO runs-on: ubuntu-latest - name: Commits Check steps: - - name: Get PR Commits - id: 'get-pr-commits' - uses: tim-actions/get-pr-commits@master + - uses: actions/checkout@v3 with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: DCO Check - uses: tim-actions/dco@master + fetch-depth: 0 + + - name: Setup Go + uses: actions/setup-go@v3 with: - commits: ${{ steps.get-pr-commits.outputs.commits }} + go-version: '1.21' + + - name: Run commit format checker + uses: https://git.frostfs.info/TrueCloudLab/dco-go@v2 + with: + from: 'origin/${{ github.event.pull_request.base.ref }}' -- 2.45.2 From 95ce6f11628e4a8b030181950a503edb96388b56 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 19 Oct 2023 11:45:10 +0300 Subject: [PATCH 3/3] [#96] .forgejo: Copy tests workflow from node Signed-off-by: Evgenii Stratonikov --- .forgejo/workflows/go.yml | 34 -------------------------------- .forgejo/workflows/tests.yml | 38 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 34 deletions(-) delete mode 100644 .forgejo/workflows/go.yml create mode 100644 .forgejo/workflows/tests.yml diff --git a/.forgejo/workflows/go.yml b/.forgejo/workflows/go.yml deleted file mode 100644 index bdeaea6..0000000 --- a/.forgejo/workflows/go.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Tests - -on: - pull_request: - branches: - - master - types: [opened, synchronize] - paths-ignore: - - '**/*.md' - workflow_dispatch: - -jobs: - lint: - name: Lint - runs-on: ubuntu-20.04 - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 - with: - version: latest - args: --timeout=2m - - tests: - name: Tests - runs-on: ubuntu-20.04 - strategy: - matrix: - go_versions: [ '1.17', '1.18', '1.19' ] - fail-fast: false - steps: - - uses: actions/checkout@v3 diff --git a/.forgejo/workflows/tests.yml b/.forgejo/workflows/tests.yml new file mode 100644 index 0000000..1fa9608 --- /dev/null +++ b/.forgejo/workflows/tests.yml @@ -0,0 +1,38 @@ +name: Tests and linters +on: [pull_request] + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + strategy: + matrix: + go_versions: [ '1.20', '1.21' ] + fail-fast: false + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '${{ matrix.go_versions }}' + cache: true + + - name: Run tests + run: make test + + tests-race: + name: Tests with -race + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '1.21' + cache: true + + - name: Run tests + run: go test ./... -count=1 -race + -- 2.45.2