From 5f41a0fd98df40998f089be42b7795e388df6342 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Tue, 7 Feb 2023 08:29:07 +0100 Subject: [PATCH] integration test --- .github/workflows/go-test.yml | 27 +++++++++++++++++++++++++++ .github/workflows/test.yml | 22 ++++++---------------- readme.md | 1 + 3 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/go-test.yml diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..dfbc373 --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,27 @@ +name: go-test + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: recursive + + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: 1.19.x + + - name: Test + run: | + go test ./... -coverprofile=profile.cov + + - uses: shogo82148/actions-goveralls@v1.6.0 + with: + path-to-profile: profile.cov \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index afdc0fa..5ca2b71 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,25 +3,15 @@ name: test on: [push, pull_request] jobs: - test: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v2 with: fetch-depth: 0 submodules: recursive - - - name: Install Go - uses: actions/setup-go@v3 - with: - go-version: 1.19.x - - - name: Test - run: | - go test ./... -coverprofile=profile.cov - - - uses: shogo82148/actions-goveralls@v1.6.0 - with: - path-to-profile: profile.cov \ No newline at end of file + - name: test + run: docker-compose up --exit-code-from sut diff --git a/readme.md b/readme.md index ff64ff4..082675c 100644 --- a/readme.md +++ b/readme.md @@ -2,6 +2,7 @@ mapcleaner ----------------- ![](https://github.com/BuckarooBanzay/mapcleaner/workflows/build/badge.svg) +![](https://github.com/BuckarooBanzay/mapcleaner/workflows/go-test/badge.svg) ![](https://github.com/BuckarooBanzay/mapcleaner/workflows/test/badge.svg) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/minetest-go/mapcleaner)