👷 Separate database test into different tags and enable default test CI.

This commit is contained in:
kiyon
2020-11-03 08:59:29 +08:00
parent f927b040f4
commit 34441f5b7c
8 changed files with 14 additions and 4 deletions

View File

@@ -30,6 +30,6 @@ jobs:
- name: Fetch Repository
uses: actions/checkout@v2
- name: Run Test
run: go test ./mongodb -v -race
run: go test ./mongodb -tags=mongodb -v -race
env:
MONGO_URI: "mongodb://root:password@127.0.0.1:27017"

View File

@@ -40,7 +40,7 @@ jobs:
- name: Fetch Repository
uses: actions/checkout@v2
- name: Run Test
run: go test ./mysql -v -race
run: go test ./mysql -tags=mysql -v -race
env:
MYSQL_ADDRESS: "127.0.0.1:3306"
MYSQL_USERNAME: username

View File

@@ -1 +1,3 @@
// +build memcache
package memcache

View File

@@ -1,3 +1,5 @@
// +build mongodb
package mongodb
import (

View File

@@ -1,3 +1,5 @@
// +build mysql
package mysql
import (

View File

@@ -1 +1,3 @@
// +build postgres
package postgres

View File

@@ -1,3 +1,5 @@
// +build redis
package redis
import (