From b65a7674024e5a5bbd1608e74b21f0cb58730790 Mon Sep 17 00:00:00 2001 From: Yukesh Kumar Date: Sun, 10 Apr 2022 23:58:31 +0530 Subject: [PATCH 1/4] Adds linter for go code Signed-off-by: Yukesh Kumar --- .github/workflows/linter.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 000000000..b7e83db2a --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,22 @@ +name: Go Linter + +on: + push: + branches: + - master + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + stable: 'false' + go-version: '1.16.1' + + - name: Lint + run: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0 + + golangci-lint run \ No newline at end of file From 0bbf6feaf96db2de428d6dd3fa7e72e18946fabc Mon Sep 17 00:00:00 2001 From: Yukesh Kumar Date: Mon, 11 Apr 2022 19:04:20 +0530 Subject: [PATCH 2/4] Usess re-usable linter Signed-off-by: Yukesh Kumar --- .github/workflows/linter.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index b7e83db2a..7d53d84cb 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -7,16 +7,7 @@ on: jobs: lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 - with: - stable: 'false' - go-version: '1.16.1' - - - name: Lint - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0 - - golangci-lint run \ No newline at end of file + name: Lint + uses: flyteorg/flytetools/.github/workflows/lint.yml@master + with: + go-version: 1.16 \ No newline at end of file From 4eb75ebbe70edbf548c661d9e7187f77b961e2b6 Mon Sep 17 00:00:00 2001 From: Yukesh Kumar Date: Mon, 11 Apr 2022 21:15:39 +0530 Subject: [PATCH 3/4] changes wrt comment Signed-off-by: Yukesh Kumar --- .github/workflows/linter.yml | 13 ------------- .github/workflows/verification.yml | 15 +++++++-------- 2 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml deleted file mode 100644 index 7d53d84cb..000000000 --- a/.github/workflows/linter.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Go Linter - -on: - push: - branches: - - master - -jobs: - lint: - name: Lint - uses: flyteorg/flytetools/.github/workflows/lint.yml@master - with: - go-version: 1.16 \ No newline at end of file diff --git a/.github/workflows/verification.yml b/.github/workflows/verification.yml index 2e919ce37..d9a136102 100644 --- a/.github/workflows/verification.yml +++ b/.github/workflows/verification.yml @@ -7,8 +7,13 @@ on: - master jobs: - tests-lint: - name: Run tests and lint + lint: + name: Lint + uses: flyteorg/flytetools/.github/workflows/lint.yml@master + with: + go-version: 1.16 + tests: + name: Unit Tests runs-on: ubuntu-latest steps: - name: Checkout @@ -21,12 +26,6 @@ jobs: GO111MODULE: "on" with: args: make install && make test_unit - - name: Lint - uses: cedrickring/golang-action@1.7.0 - env: - GO111MODULE: "on" - with: - args: make install && make lint generate-protos: runs-on: ubuntu-latest name: Generate Protos From bcafce0803eaa6bcffdae10b55cca52e0f60886d Mon Sep 17 00:00:00 2001 From: Yukesh Kumar Date: Mon, 11 Apr 2022 21:45:39 +0530 Subject: [PATCH 4/4] changes wrt comments Signed-off-by: Yukesh Kumar --- .github/workflows/verification.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/verification.yml b/.github/workflows/verification.yml index d9a136102..ed3b95086 100644 --- a/.github/workflows/verification.yml +++ b/.github/workflows/verification.yml @@ -14,18 +14,11 @@ jobs: go-version: 1.16 tests: name: Unit Tests - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - name: Unit Tests - uses: cedrickring/golang-action@1.7.0 - env: - GO111MODULE: "on" - with: - args: make install && make test_unit + uses: flyteorg/flytetools/.github/workflows/tests.yml@master + secrets: + FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} + with: + go-version: 1.16 generate-protos: runs-on: ubuntu-latest name: Generate Protos