From a7ddff1cd369dc621d9f2268c6fd5d4373b81d51 Mon Sep 17 00:00:00 2001 From: Ryan Collingham Date: Fri, 12 Jul 2024 10:07:00 +0100 Subject: [PATCH] run mysql as container service in gh action --- .github/workflows/build_and_test.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 62ff36c..9b49481 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -31,8 +31,10 @@ jobs: run: go build - name: Test - run: | - cd database/docker - docker-compose up --detach - cd ../../indexer - go test . + run: go test -v ./indexer + services: + mysql: + image: mysql + ports: 3306:3306 + environment: + MYSQL_ROOT_PASSWORD: "root"