Skip to content

Update DOC.md #129

Update DOC.md

Update DOC.md #129

Workflow file for this run

name: Go Lint and Test with MySQL
on:
pull_request:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Install dependencies
run: go mod download
- name: Run lint
run: make lint
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0.28
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: template
MYSQL_USER: docker
MYSQL_PASSWORD: password
ports:
- 3306:3306
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Install dependencies
run: go mod download
- name: Set environment variables
run: |
echo "DB_USER=docker" >> $GITHUB_ENV
echo "DB_PASSWORD=password" >> $GITHUB_ENV
echo "DB_HOST=localhost" >> $GITHUB_ENV
echo "DB_PORT=3306" >> $GITHUB_ENV
echo "DB_NAME=template" >> $GITHUB_ENV
- name: Run tests
run: go test ./...