Skip to content

Commit

Permalink
test: MongoDBの接続を追加してみる
Browse files Browse the repository at this point in the history
  • Loading branch information
taako-502 committed Mar 4, 2024
1 parent b875189 commit 2bf19aa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,27 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest

services:
mongodb:
image: mongo:7.0.5
ports:
- 27017:27017

steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Get dependencies
run: go mod download

- name: Test
run: go test ./... -v
env:
MONGO_CI_CONNECTION_STRING: mongodb://localhost:27017/?directConnection=true
MONGO_CI_DATABASE_NAME: testdb

0 comments on commit 2bf19aa

Please sign in to comment.