Skip to content

[1126] section 85

[1126] section 85 #46

Workflow file for this run

on:
push:
branches:
- "main"
pull_request:
name: test
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8
options: --health-cmd "mysqladmin ping -h localhost" --health-interval 20s --health-timeout 10s --health-retries 10
ports:
- 3306:3306
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: todo
MYSQL_USER: todo
MYSQL_PASSWORD: todo
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/setup-go@v3
with:
go-version: '>=1.18'
- uses: actions/checkout@v3
- run: |
go install github.com/sqldef/sqldef/cmd/mysqldef@latest
mysqldef -u todo -p todo -h 127.0.0.1 -P 3306 todo < ./chapter18/section72/_tools/mysql/schema.sql
- run: cd ${{ github.workspace }}/chapter18/section72 && go test ./... -coverprofile=coverage.out
- name: report coverage
uses: k1LoW/octocov-action@v0