diff --git a/.github/workflows/build-test-coverage.yml b/.github/workflows/build-test-coverage.yml index 7bc30a7..1e12d08 100644 --- a/.github/workflows/build-test-coverage.yml +++ b/.github/workflows/build-test-coverage.yml @@ -1,8 +1,11 @@ # This workflow will test and run code coverage for the golang project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go -name: Build Release Assets -on: [push] +name: Build Test Coverage +on: + pull_request: + push: + env: TEST_RESULTS: /tmp/test-results @@ -11,16 +14,17 @@ jobs: build-release-x86_64: runs-on: ubuntu-20.04 steps: + - name: Checkout code + uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v4 with: go-version: '1.20' - - name: Checkout code - uses: actions/checkout@v4 - + cache: true - name: Create test directory run: mkdir -p $TEST_RESULTS - + - name: Install gotestsum + run: go install gotest.tools/gotestsum@latest - name: Run unit tests run: | PACKAGE_NAMES=$(go list ./... | xargs)