Prechádzať zdrojové kódy

test: add github action workflow

Jackson Tian 3 rokov pred
rodič
commit
be6c27326e
2 zmenil súbory, kde vykonal 22 pridanie a 0 odobranie
  1. 21 0
      .github/workflows/test.yaml
  2. 1 0
      .gitignore

+ 21 - 0
.github/workflows/test.yaml

@@ -0,0 +1,21 @@
+name: Test
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    name: CPP
+    env:
+      CPLUS_INCLUDE_PATH: "/usr/local/include/:/usr/include/jsoncpp/:/usr/local/opt/openssl/include/:/usr/lib/"
+    steps:
+      - uses: actions/checkout@v3
+      - run: sudo apt-get install lcov libcurl4-openssl-dev libssl-dev uuid-dev libjson-c-dev libjsoncpp-dev nodejs npm
+      - run: bash ./unit_test.sh
+      - run: bash  ./generate_code_cov.sh
+      - run: bash ./function_test.sh
+      - run: bash <(curl -s https://codecov.io/bash)

+ 1 - 0
.gitignore

@@ -14,3 +14,4 @@ test/httpserver/nohup.out
 .idea
 build/
 cmake-build-debug/
+.DS_Store