From db0a947ddbfbb0ba93e59808256b12e551941d3c Mon Sep 17 00:00:00 2001 From: Aleksandr Tolstikhin Date: Sat, 7 Dec 2024 00:50:59 +0700 Subject: [PATCH 1/7] New yml --- .gitea/workflows/job_lint.yml | 26 +++++++++++ .gitea/workflows/job_test.yml | 26 +++++++++++ .gitea/workflows/pipeline.yml | 82 ++++++++++++++++++----------------- 3 files changed, 94 insertions(+), 40 deletions(-) create mode 100644 .gitea/workflows/job_lint.yml create mode 100644 .gitea/workflows/job_test.yml diff --git a/.gitea/workflows/job_lint.yml b/.gitea/workflows/job_lint.yml new file mode 100644 index 00000000..809e6c31 --- /dev/null +++ b/.gitea/workflows/job_lint.yml @@ -0,0 +1,26 @@ +name: lint + +on: + pull_request: + branches: + - master + - v3 + - v4 + +jobs: + lint: + name: 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: v1.62.2 diff --git a/.gitea/workflows/job_test.yml b/.gitea/workflows/job_test.yml new file mode 100644 index 00000000..f484b617 --- /dev/null +++ b/.gitea/workflows/job_test.yml @@ -0,0 +1,26 @@ +name: test + +on: + pull_request: + branches: + - master + - v3 + - v4 + +jobs: + test: + name: 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/.gitea/workflows/pipeline.yml b/.gitea/workflows/pipeline.yml index 31f97f3b..8ae41fd6 100644 --- a/.gitea/workflows/pipeline.yml +++ b/.gitea/workflows/pipeline.yml @@ -1,40 +1,42 @@ -name: pipeline -on: - pull_request: - branches: - - master - - v3 - - v4 -jobs: - lint: - name: 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: v1.62.2 - test: - name: 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 ./... +# name: pipeline + +# on: +# pull_request: +# branches: +# - master +# - v3 +# - v4 + +# jobs: +# lint: +# name: 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: v1.62.2 +# test: +# name: 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 ./... -- 2.47.1 From 61dfa6a94352f35477536e9376fe71645b84942b Mon Sep 17 00:00:00 2001 From: Aleksandr Tolstikhin Date: Sat, 7 Dec 2024 01:05:29 +0700 Subject: [PATCH 2/7] Upd yml --- .gitea/workflows/job_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/job_test.yml b/.gitea/workflows/job_test.yml index f484b617..8ea0e79c 100644 --- a/.gitea/workflows/job_test.yml +++ b/.gitea/workflows/job_test.yml @@ -1,6 +1,7 @@ name: test on: + push: pull_request: branches: - master -- 2.47.1 From fed7af4ad8210d0ff64ea229e8930b137dd2208d Mon Sep 17 00:00:00 2001 From: Aleksandr Tolstikhin Date: Sat, 7 Dec 2024 01:13:39 +0700 Subject: [PATCH 3/7] Upd condition and del pipeline yml --- .gitea/workflows/job_lint.yml | 1 + .gitea/workflows/job_test.yml | 1 + .gitea/workflows/pipeline.yml | 42 ----------------------------------- 3 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 .gitea/workflows/pipeline.yml diff --git a/.gitea/workflows/job_lint.yml b/.gitea/workflows/job_lint.yml index 809e6c31..aa45e23d 100644 --- a/.gitea/workflows/job_lint.yml +++ b/.gitea/workflows/job_lint.yml @@ -2,6 +2,7 @@ name: lint on: pull_request: + types: [opened, reopened, closed] branches: - master - v3 diff --git a/.gitea/workflows/job_test.yml b/.gitea/workflows/job_test.yml index 8ea0e79c..550f2bda 100644 --- a/.gitea/workflows/job_test.yml +++ b/.gitea/workflows/job_test.yml @@ -3,6 +3,7 @@ name: test on: push: pull_request: + types: [opened, reopened, closed] branches: - master - v3 diff --git a/.gitea/workflows/pipeline.yml b/.gitea/workflows/pipeline.yml deleted file mode 100644 index 8ae41fd6..00000000 --- a/.gitea/workflows/pipeline.yml +++ /dev/null @@ -1,42 +0,0 @@ -# name: pipeline - -# on: -# pull_request: -# branches: -# - master -# - v3 -# - v4 - -# jobs: -# lint: -# name: 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: v1.62.2 -# test: -# name: 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 ./... -- 2.47.1 From d3931886effaff9b215b1333ed18a20d6b91bd75 Mon Sep 17 00:00:00 2001 From: Aleksandr Tolstikhin Date: Sat, 7 Dec 2024 01:15:10 +0700 Subject: [PATCH 4/7] Fix --- .gitea/workflows/job_test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitea/workflows/job_test.yml b/.gitea/workflows/job_test.yml index 550f2bda..5a21158c 100644 --- a/.gitea/workflows/job_test.yml +++ b/.gitea/workflows/job_test.yml @@ -2,6 +2,10 @@ name: test on: push: + branches: + - master + - v3 + - v4 pull_request: types: [opened, reopened, closed] branches: -- 2.47.1 From 34f1caaed67c943aad11a50ddfd80d1275a89af1 Mon Sep 17 00:00:00 2001 From: Aleksandr Tolstikhin Date: Sat, 7 Dec 2024 01:37:27 +0700 Subject: [PATCH 5/7] Upd lint --- .gitea/workflows/job_lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/job_lint.yml b/.gitea/workflows/job_lint.yml index aa45e23d..ffaaeb5b 100644 --- a/.gitea/workflows/job_lint.yml +++ b/.gitea/workflows/job_lint.yml @@ -2,15 +2,15 @@ name: lint on: pull_request: - types: [opened, reopened, closed] + types: [opened, reopened, closed, synchronize] branches: - master - v3 - v4 jobs: - lint: - name: lint + if_merged: + if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - name: setup-go -- 2.47.1 From 6e9aa3b4bdba9f214283e3d8573a49903379a83b Mon Sep 17 00:00:00 2001 From: Aleksandr Tolstikhin Date: Sat, 7 Dec 2024 01:57:57 +0700 Subject: [PATCH 6/7] Upd ymls --- .gitea/workflows/job_lint.yml | 2 +- .gitea/workflows/job_test.yml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/job_lint.yml b/.gitea/workflows/job_lint.yml index ffaaeb5b..19f6107e 100644 --- a/.gitea/workflows/job_lint.yml +++ b/.gitea/workflows/job_lint.yml @@ -10,7 +10,7 @@ on: jobs: if_merged: - if: github.event.pull_request.merged == true + if: ${{ github.event.pull_request.state != 'closed' || github.event.pull_request.merged == true }} runs-on: ubuntu-latest steps: - name: setup-go diff --git a/.gitea/workflows/job_test.yml b/.gitea/workflows/job_test.yml index 5a21158c..f01c405b 100644 --- a/.gitea/workflows/job_test.yml +++ b/.gitea/workflows/job_test.yml @@ -1,21 +1,21 @@ name: test on: + pull_request: + types: [opened, reopened, closed, synchronize] + branches: + - master + - v3 + - v4 push: branches: - master - v3 - v4 - pull_request: - types: [opened, reopened, closed] - branches: - - master - - v3 - - v4 jobs: - test: - name: test + if_merged: + if: ${{ github.event.pull_request.state != 'closed' || github.event.pull_request.merged == true }} runs-on: ubuntu-latest steps: - name: setup-go -- 2.47.1 From 7446321c9e0cb2e4e8aac6f0d7e43ec7d6c3ff59 Mon Sep 17 00:00:00 2001 From: Aleksandr Tolstikhin Date: Sat, 7 Dec 2024 01:59:15 +0700 Subject: [PATCH 7/7] fix --- .gitea/workflows/job_lint.yml | 3 +-- .gitea/workflows/job_test.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/job_lint.yml b/.gitea/workflows/job_lint.yml index 19f6107e..6385c4af 100644 --- a/.gitea/workflows/job_lint.yml +++ b/.gitea/workflows/job_lint.yml @@ -1,5 +1,3 @@ -name: lint - on: pull_request: types: [opened, reopened, closed, synchronize] @@ -10,6 +8,7 @@ on: jobs: if_merged: + name: lint if: ${{ github.event.pull_request.state != 'closed' || github.event.pull_request.merged == true }} runs-on: ubuntu-latest steps: diff --git a/.gitea/workflows/job_test.yml b/.gitea/workflows/job_test.yml index f01c405b..5feb9d2d 100644 --- a/.gitea/workflows/job_test.yml +++ b/.gitea/workflows/job_test.yml @@ -1,5 +1,3 @@ -name: test - on: pull_request: types: [opened, reopened, closed, synchronize] @@ -15,6 +13,7 @@ on: jobs: if_merged: + name: test if: ${{ github.event.pull_request.state != 'closed' || github.event.pull_request.merged == true }} runs-on: ubuntu-latest steps: -- 2.47.1