refactor: remove the service
comment out.
#40
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Backend CI | |
on: | |
push: | |
paths: | |
- Backend/** | |
- .github/workflows/test-go-unit.yml | |
pull_request: | |
paths: | |
- Backend/** | |
- .github/workflows/test-go-unit.yml | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:latest | |
env: | |
MYSQL_ROOT_PASSWORD: ${{ secrets.DB_ROOT_PASSWORD }} | |
MYSQL_DATABASE: ${{ secrets.DB_DATABASE }} | |
MYSQL_USER: ${{ secrets.DB_USER }} | |
MYSQL_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
ports: | |
- "3306:3306" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Env handle | |
working-directory: ./Backend | |
run: cp env .env | |
- name: Build | |
working-directory: ./Backend | |
run: go build -v ./... | |
- name: Migration | |
working-directory: ./Backend | |
run: go run ./cmd/migrate/migrate.go | |
- name: Test | |
working-directory: ./Backend | |
run: go test ./... -v -count=1 -coverprofile=coverage.out | |
- name: Upload coverage report as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-report | |
path: ./Backend/coverage.out |