From 1b802165698c4dc1765f99c00c8b88160288d034 Mon Sep 17 00:00:00 2001 From: Nico Braun Date: Fri, 9 Jun 2023 09:01:33 +0200 Subject: [PATCH] chore: add github action to run test suit Signed-off-by: Nico Braun --- .github/workflows/test.yaml | 38 +++++++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..5ff97e7 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,38 @@ +name: test + +on: + workflow_dispatch: null + push: + branches: + - master + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + +jobs: + test: + runs-on: ubuntu-22.04 + + services: + postgresql: + image: postgres:14.1-alpine + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: rootUserSeriousPassword1 + POSTGRES_DB: ivoryPgExisting + ports: + - 127.0.0.1:5555:5432 + + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" + + - name: Run Test Suit + run: go test ./... diff --git a/README.md b/README.md index e3408bb..d0d9659 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Reference](https://pkg.go.dev/badge/github.com/tristanfisher/ivory.svg)](https://pkg.go.dev/github.com/tristanfisher/ivory) [![Go Report Card](https://goreportcard.com/badge/github.com/tristanfisher/ivory)](https://goreportcard.com/report/github.com/tristanfisher/ivory) +[![test](https://github.com/tristanfisher/ivory/actions/workflows/test.yaml/badge.svg)](https://github.com/bluebrown/ivory/actions/workflows/test.yaml) ## Overview