From 3cf65cbacdae66d7e5db7aacc0b48e45ec657629 Mon Sep 17 00:00:00 2001 From: Frank Mayer Date: Sun, 29 Sep 2024 00:05:26 +0200 Subject: [PATCH] build: run tests on push and pr --- .github/workflows/test.yml | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..80092a2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,58 @@ +# yaml-language-server: https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json +--- +name: goreleaser + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test-mac: + runs-on: macos-latest + steps: + - name: Setup Go environment + uses: actions/setup-go@v5 + with: + go-version: stable + cache: true + architecture: x64 + - name: Checkout + uses: actions/checkout@v4 + - name: Build + run: go build ./... + - name: Test + run: go test ./... -v + test-win: + runs-on: windows-latest + steps: + - name: Setup Go environment + uses: actions/setup-go@v5 + with: + go-version: stable + cache: true + architecture: x64 + - name: Checkout + uses: actions/checkout@v4 + - name: Build + run: go build ./... + - name: Test + run: go test ./... -v + test-linux: + runs-on: ubuntu-latest + steps: + - name: Setup Go environment + uses: actions/setup-go@v5 + with: + go-version: stable + cache: true + architecture: x64 + - name: Checkout + uses: actions/checkout@v4 + - name: Build + run: go build ./... + - name: Test + run: go test ./... -v