Skip to content

add code

add code #93

Workflow file for this run

on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.21.x]
os: [ubuntu-latest,]
runs-on: ${{ matrix.os }}
services:
# https://stackoverflow.com/questions/72294279/how-to-connect-to-mysql-databas-using-github-actions
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test_db
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Start Redis Server
uses: supercharge/redis-github-action@1.7.0
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Test
run: go test ./...
- name: Check Build All
run: go build ./...