diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f1a309824..78b4abcbf 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,15 +6,15 @@ jobs: unit_tests: strategy: matrix: - go-version: [1.20.x] + go-version: [1.21.x] os: [ubuntu-latest, macos-latest, windows-latest] include: - - go-version: 1.17.x - os: ubuntu-latest - go-version: 1.18.x os: ubuntu-latest - go-version: 1.19.x os: ubuntu-latest + - go-version: 1.20.x + os: ubuntu-latest runs-on: ${{ matrix.os }} steps: - name: Checkout code @@ -30,3 +30,22 @@ jobs: - name: Make Test run: make test + test_coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: 1.21.x + + - name: Make all + run: make all + + - name: Make Coverage + run: make test-coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 diff --git a/.gitignore b/.gitignore index 0d003a229..f60fd9923 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,5 @@ package.json /.vscode/ /vendor/ -.fake_gopath_suffix \ No newline at end of file +.fake_gopath_suffix +coverage.out diff --git a/Makefile b/Makefile index e6384556f..0b644b9c8 100644 --- a/Makefile +++ b/Makefile @@ -47,3 +47,6 @@ $(CURDIR)/bin/disco test:| go_version_check @go test -cover $(PACKAGES) +test-coverage:| go_version_check + @go test -race -coverprofile=coverage.out -covermode=atomic $(PACKAGES) +