From 4251febf61c59b5a8f0e256257fb6a23786dbf0e Mon Sep 17 00:00:00 2001 From: Ardit Marku Date: Mon, 18 Dec 2023 13:31:53 +0200 Subject: [PATCH] Add a basic Makefile and CI workflow for GitHub --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ Makefile | 4 ++++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 Makefile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..7bce72d7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + test: + name: "Test" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-go@v4 + with: + go-version: '1.20.x' + - uses: actions/cache@v3 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Run tests + run: make test diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..aceac132 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +.PHONY: test +test: + # test all packages + go test -parallel 8 ./...