This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
feat(service): add reset mode #49
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: ci | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
go: ['1.19', '1.18'] | |
platform: [ubuntu-latest] | |
runs-on: ${{ matrix.platform }} | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_DB: gosd | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
ports: | |
- "5432:5432" | |
redis: | |
image: redis:6-alpine | |
ports: | |
- "6379:6379" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Test | |
env: | |
DATABASE_URL: "postgres://postgres:password@localhost/gosd?sslmode=disable" | |
REDIS_URL: "redis://localhost:6379/5" | |
run: | | |
go run main.go database migrate | |
go run main.go database seed | |
make cover | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |