From 862d2ea4c21e80696c8c40ca59f7f6217f1f0f1c Mon Sep 17 00:00:00 2001 From: kushthedude Date: Fri, 30 Jul 2021 19:23:48 +0530 Subject: [PATCH 1/3] feat: introduce golangci-lint action for faster builds Signed-off-by: kushthedude --- .github/workflows/ci.yml | 44 +++++++++++++--------------------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc9c67f48..0cb07b565 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,13 +20,9 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: 1.14.x + go-version: 1.13.x - uses: actions/checkout@v2 - # In this step, this action saves a list of existing images, - # the cache is created without them in the post run. - # It also restores the cache if it exists. - uses: satackey/action-docker-layer-caching@v0.0.11 - # Ignore the failure of a step and avoid terminating the job. continue-on-error: true - name: Build test environment and run tests run: | @@ -38,41 +34,29 @@ jobs: ../bin/blobber.start_bls.sh /dev/null & cd ../.. make integration-tests - lint: - runs-on: ubuntu-20.04 + golangci: + name: lint + runs-on: ubuntu-latest steps: - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: 1.14.x - uses: actions/checkout@v2 - - name: Install golangci-lint - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.38.0 - golangci-lint --version - - name: Lint - run: make lint + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: latest buf-build: runs-on: ubuntu-latest steps: - - name: checkout - if: success() - uses: actions/checkout@v2 + - name: Check out code + uses: actions/checkout@master with: - ref: master - - name: checkout-master - if: success() - run: git checkout master - - name: checkout - if: success() - uses: actions/checkout@v2 - - name: setup + fetch-depth: 1 + - name: setup golang if: success() uses: actions/setup-go@v2 with: - go-version: 1.14.x - - name: make local + go-version: 1.13.x + - name: run buf commands if: success() run: make local From 25ce5a319fd05129520e5f5a4d05dad7f9be8a3e Mon Sep 17 00:00:00 2001 From: kushthedude Date: Fri, 30 Jul 2021 19:26:22 +0530 Subject: [PATCH 2/3] make go-version 1.13.x From 250db04af346619ae2dececd3abe04f8b9bef700 Mon Sep 17 00:00:00 2001 From: kushthedude Date: Fri, 30 Jul 2021 19:29:22 +0530 Subject: [PATCH 3/3] increase timeout config Signed-off-by: kushthedude --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cb07b565..0e708cf80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,7 @@ jobs: uses: golangci/golangci-lint-action@v2 with: version: latest + args: --timeout=2m0s buf-build: runs-on: ubuntu-latest