Skip to content

Merge pull request #228 from anchore/dependabot/go_modules/github.com… #455

Merge pull request #228 from anchore/dependabot/go_modules/github.com…

Merge pull request #228 from anchore/dependabot/go_modules/github.com… #455

Workflow file for this run

name: "Tests"
on:
workflow_dispatch:
push:
jobs:
Unit-Tests:
strategy:
matrix:
# test the lower bounds of support, and the latest available
go-version: ["1.21.x"]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 #v5.0.1
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Restore bootstrap cache
id: bootstrap-cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
with:
path: |
~/go/pkg/mod
${{ github.workspace }}/.tmp
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}-
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Bootstrap project dependencies
if: steps.bootstrap-cache.outputs.cache-hit != 'true'
run: make bootstrap
- name: Run unit tests
run: make unit