From abcd63afa7e40c4eb99b81a2e1fb78fbbb33abe7 Mon Sep 17 00:00:00 2001 From: Gareth Date: Fri, 10 Nov 2023 22:44:20 -0800 Subject: [PATCH] Create build-and-test.yml --- .github/workflows/build-and-test.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 00000000..8784d4b1 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,32 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Build and Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Restic + run: apt install restic + + - name: Build + run: go build -v ./... + + - name: Test + run: go test ./...