From 8d23d1d1c81cee8ed63590d5ead47612a78a5586 Mon Sep 17 00:00:00 2001 From: lc-1010 <532398960@qq.com> Date: Sun, 25 Jun 2023 14:08:43 +0800 Subject: [PATCH] (github): Update workflows Updates workflows #13 --- .github/workflows/go.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3e9a76d..a754609 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -9,6 +9,11 @@ on: pull_request: branches: [ "main" ] +env: + DB_DATABASE: blog_service + DB_USER: root + DB_PASSWORD: root + jobs: build: @@ -21,6 +26,11 @@ jobs: with: go-version: 1.19 + - name: "Mysql Setup" + run : | + sudo /etc/init.d/mysql start + mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} + - name: Build run: go build -v ./...