From 9db3f8e1389e4ab866f0757979220a62b11baefb Mon Sep 17 00:00:00 2001 From: Edgar Latorre Date: Thu, 8 Feb 2024 20:57:15 +0100 Subject: [PATCH] Add github action --- .github/workflows/ci.yml | 19 +++++++++++++++++++ Makefile | 10 ++++++++++ 2 files changed, 29 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 0000000..4fda9f1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +on: + push: + branches: [main] + pull_request: + branches: [ main ] + +jobs: + testing: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.21.x' + - name: Install dependencies + run: make get + - name: Run tests + run: make test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bc1d831 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +.PHONY: all test clean + +run: + go run ./cmd/bookmark + +test: + go test ./test/... -v + +get: + go get ./cmd/bookmark