Unverified Commit 922c5a6b authored by Derek Nola's avatar Derek Nola Committed by GitHub

Unit Testing Matrix and Actions bump (#9479)

cache is now on by default Signed-off-by: 's avatarDerek Nola <derek.nola@suse.com>
parent 57e11c72
......@@ -28,10 +28,7 @@ permissions:
jobs:
test:
name: Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
......@@ -41,23 +38,21 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.21.7'
go-version-file: go.mod # Just use whatever version is in the go.mod file
check-latest: true
cache: true
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Run Unit Tests
run: |
go test -coverpkg=./... -coverprofile=coverage.out ./pkg/... -run Unit
go tool cover -func coverage.out
- name: On Failure, Launch Debug Session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 5
uses: lhotari/action-upterm@v1
with:
wait-timeout-minutes: 5
- name: Upload Results To Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
flags: unittests # optional
verbose: true # optional (default = false)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment