From 3ebe5d9af76c84c915df70d7177ca28e4cc928d1 Mon Sep 17 00:00:00 2001 From: Houdini Date: Fri, 2 Aug 2024 15:10:01 +0100 Subject: [PATCH] chore: setup github actions --- .github/workflows/main.yaml | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7e422f7..7582646 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,24 +1,28 @@ name: zwis library workflow on: - push: + push: branches: - - main + - main + pull_request: + branches: + - main jobs: - build: + test: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 - - name: Setup Go - uses: actions/checkout@v2 - with: - go-version: '1.21' - - name: Install dependencies - run: | - go version - go install -v ./... - - - name: Run Tests - run: | - go test -v ./tests/... \ No newline at end of file + - name: Check out code + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.20 + + - name: Install dependencies + run: go mod tidy + + - name: Run tests + run: go test -v ./tests/...