From 29f429eda3911d96d4545ae82a3cf05f271b4573 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Fri, 10 Dec 2021 16:50:35 +0700 Subject: [PATCH] ci: simplifying jobs --- .github/workflows/build.yml | 26 -------------------------- .github/workflows/coverage.yml | 11 +++++++---- 2 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index f6984cd..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Build test - -on: [pull_request, push] - -jobs: - build-test: - name: Build test - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - go-version: [1.15.x, 1.16.x, 1.17.x] - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - - name: Run go vet - run: go vet - - - name: Test - run: go test -v -race -covermode=atomic -failfast \ No newline at end of file diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index cd0b9d6..c737f07 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -3,21 +3,24 @@ name: Test and coverage on: [push, pull_request] jobs: - build: + check: + name: Check runs-on: ubuntu-latest + needs: build steps: - name: Checkout code uses: actions/checkout@v2 - with: - fetch-depth: 2 - name: Install Go uses: actions/setup-go@v2 with: go-version: 1.17.x + - name: Vet check + run: go vet -v + - name: Run coverage run: go test -v -race -coverprofile=coverage.out -covermode=atomic -failfast - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 \ No newline at end of file + uses: codecov/codecov-action@v1