Skip to content

key auth middleware #72

key auth middleware

key auth middleware #72

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Run unit Tests
on:
pull_request:
paths:
- 'app/**'
jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0.35
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: school_lunch_test
MYSQL_USER: user
MYSQL_PASSWORD: password
TZ: 'Asia/Tokyo'
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: true
cache-dependency-path: app/go.sum
go-version: '1.21'
- name: Install golang-migrate
run: |
curl -L https://github.com/golang-migrate/migrate/releases/download/v4.16.2/migrate.linux-amd64.tar.gz | tar xvz
sudo mv migrate /usr/bin/migrate
which migrate
- name: Set up environment variables
run: |
cp app/.env.example app/.env
- name: Run migrations
run: make migrate_ci
- name: Test
run: make test