From c4e855c1a7d1636a0fb992d2be1d63cf3f895606 Mon Sep 17 00:00:00 2001 From: Raj Nandan Sharma Date: Wed, 6 Mar 2024 09:00:48 +0530 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e38d885 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: Run Tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '1.15' + + - name: Test + run: go mod tidy && go test -race -covermode atomic -coverprofile=covprofile ./... + - name: Install goveralls + run: go install github.com/mattn/goveralls@latest + - name: Send coverage + env: + COVERALLS_TOKEN: ${{ secrets.TOKEN_GITHUB }} + run: goveralls -coverprofile=covprofile