diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 17ab01d..9f2f00c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,4 +1,4 @@ -# checks performs several code quality checks +# performs several code quality checks name: checks on: pull_request: @@ -6,7 +6,7 @@ on: branches: - "master" jobs: - test: + perform_code_quality_checks: runs-on: "${{ matrix.os }}" strategy: matrix: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 71a3973..c7da1cc 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,4 +1,4 @@ -# coverage computes the code coverage +# runs tests and computes the code coverage name: coverage on: pull_request: @@ -7,7 +7,8 @@ on: - "master" - "release/**" jobs: - test: + + measure_coverage: runs-on: ubuntu-20.04 strategy: matrix: @@ -15,17 +16,19 @@ jobs: - "1.17.9" - "1.18.1" steps: - - uses: actions/setup-go@v1 + - uses: magnetikonline/action-golang-cache@v2 with: go-version: "${{ matrix.go }}" + cache-key-suffix: "-coverage-${{ matrix.go }}" - uses: actions/checkout@v2 - run: go test -short -race -tags shaping -coverprofile=probe-cli.cov ./... - uses: shogo82148/actions-goveralls@v1 with: path-to-profile: probe-cli.cov parallel: true - finish: - needs: test + + finish_measuring_coverage: + needs: measure_coverage runs-on: ubuntu-latest steps: - uses: shogo82148/actions-goveralls@v1 diff --git a/.github/workflows/netxlite.yml b/.github/workflows/netxlite.yml index 2390163..5bc59b5 100644 --- a/.github/workflows/netxlite.yml +++ b/.github/workflows/netxlite.yml @@ -6,15 +6,16 @@ on: branches: - "master" jobs: - test: + test_netxlite_package: runs-on: "${{ matrix.os }}" strategy: matrix: go: [ "1.17.9" ] os: [ "ubuntu-20.04", "windows-2019", "macos-10.15" ] steps: - - uses: actions/setup-go@v1 + - uses: magnetikonline/action-golang-cache@v2 with: go-version: "${{ matrix.go }}" + cache-key-suffix: "-coverage-${{ matrix.go }}" - uses: actions/checkout@v2 - run: go test -race ./internal/netxlite/...