From f936749f15c395c62d292a72a3acc490d6946a06 Mon Sep 17 00:00:00 2001 From: Mohammad Date: Fri, 14 Apr 2023 15:39:55 +0330 Subject: [PATCH] chore: setup code coverage test workflow --- .github/workflows/test.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..13366a9 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,32 @@ +name: Test and Coverage + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + name: Test + runs-on: + - ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: '1.20.3' + - name: Run test + run: make test + - name: Upload coverage to CodeCov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }}