瀏覽代碼

Merge pull request #94 from gravitl/fix-tests

github action to run integration tests on push
Alex 4 年之前
父節點
當前提交
deeffa51f9
共有 1 個文件被更改,包括 23 次插入0 次删除
  1. 23 0
      .github/workflows/test.yml

+ 23 - 0
.github/workflows/test.yml

@@ -0,0 +1,23 @@
+name: Integration Test
+
+on:
+  push:
+
+jobs:
+  tests:
+    runs-on: ubuntu-latest
+    services:
+      mongodb:
+        image: mongo:4.2
+        ports:
+          - 27017:27017
+        env:
+          MONGO_INITDB_ROOT_USERNAME: mongoadmin
+          MONGO_INITDB_ROOT_PASSWORD: mongopass
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+      - name: run tests
+        run: |
+            cd test
+            go test . -v