From 31a2ed88246e2a0eed346df79c0fa0ca31418331 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Sat, 14 Jun 2025 17:16:54 +1200 Subject: [PATCH] Test: Add automated tests using the rqlite database --- .github/workflows/tests-rqlite.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/tests-rqlite.yml diff --git a/.github/workflows/tests-rqlite.yml b/.github/workflows/tests-rqlite.yml new file mode 100644 index 0000000..8e7090d --- /dev/null +++ b/.github/workflows/tests-rqlite.yml @@ -0,0 +1,29 @@ +name: Tests (rqlite) +on: + pull_request: + branches: [ develop, 'feature/**' ] + push: + branches: [ develop, 'feature/**' ] + +jobs: + test-rqlite: + runs-on: ubuntu-latest + services: + rqlite: + image: rqlite/rqlite:latest + ports: + - 4001:4001 + env: + # the HTTP address the rqlite node should advertise + HTTP_ADV_ADDR: "localhost:4001" + steps: + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' + cache-dependency-path: "**/*.sum" + - run: go test -p 1 ./internal/storage ./server ./internal/smtpd ./internal/pop3 ./internal/tools ./internal/html2text ./internal/htmlcheck ./internal/linkcheck -v + env: + # set Mailpit to use the rqlite service container + MP_DATABASE: "http://localhost:4001"