From c8c98af534db56bd5c8580ee089fcad1747985f6 Mon Sep 17 00:00:00 2001 From: Romain Dartigues Date: Wed, 15 May 2024 15:33:46 +0200 Subject: [PATCH] CI: add unit-tests --- .github/workflows/unit-tests.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 0000000..d48c9a2 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,31 @@ +name: unit-tests + +on: + pull_request: ~ + push: ~ + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: set up go + uses: actions/setup-go@v2 + with: + go-version: 1.22 + + - name: cache go modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: "${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}" + restore-keys: | + ${{ runner.os }}-go- + + - name: tests + run: | + go test -v ./...