From 7277f1a2a1edcd71657acff2ed8d2ce6dd948727 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Tue, 19 Mar 2024 13:07:15 +0100 Subject: [PATCH] Add Codecov Signed-off-by: Ulysses Souza --- .github/workflows/ci.yml | 12 +++++++++--- .gitignore | 2 +- Makefile | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f4ce0e..5884ddf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,10 +10,10 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4.1.1 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5.0.0 with: go-version: '1.21' @@ -23,4 +23,10 @@ jobs: gotestsum_version: '1.11.0' - name: Test - run: gotestsum --format testname ./... + run: make test + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ulyssessouza/envlang diff --git a/.gitignore b/.gitignore index 763d456..1b3ac10 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -parser +coverage.out \ No newline at end of file diff --git a/Makefile b/Makefile index e1f84b6..13696f4 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: clean gen test @echo "All done!" test: - @gotestsum --format testname -- -failfast ./... + @gotestsum --format testname -- -failfast -race -covermode=atomic -coverprofile=coverage.out ./... gen: @antlr4 -Dlanguage=Go -o gen/fileparser -package fileparser EnvLangFile.g4