diff --git a/.github/workflows/rocksdb.yml b/.github/workflows/rocksdb.yml index e4b383b..453a8ab 100644 --- a/.github/workflows/rocksdb.yml +++ b/.github/workflows/rocksdb.yml @@ -8,7 +8,7 @@ on: - master # 1次/3天 在凌晨一点触发执行任务 schedule: - - cron: '0 13 */3 * *' + - cron: '0 17 */3 * *' # 手动触发 workflow_dispatch: @@ -19,79 +19,50 @@ jobs: name: openSource and no auth runs-on: ubuntu-16.04 steps: - - name: install JDK 8 and cache maven repository - - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'adopt' - - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - - name: install python 3.7 and cache python dependencies - - uses: actions/setup-python@v2 - with: - python-version: '3.7' - architecture: 'x64' - - uses: actions/cache@v2 - id: cache-pip - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + - name: install JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + - name: cache maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: install python 3.7 + uses: actions/setup-python@v2 + with: + python-version: '3.7' + architecture: 'x64' - - name: checkout python test scripts and install dependencies + - name: cache python dependencies + uses: actions/cache@v2 + id: cache-pip + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: checkout python scripts uses: actions/checkout@v2 with: - ref: master fetch-depth: 2 + + - name: install python dependencies if: steps.cache-pip.outputs.cache-hit != 'true' - run: | + run: | pwd - pip install requirements.txt - + ls + tree + pip install -r requirements.txt - name: edit config and install hugegraph components run: | + cat config.py sed -i 's/^server_port.*$/server_port = 8089/g' config.py - python3 start_deploy.py - + cat config.py + python start_deploy.py - name: run test cases - run: python3 test_start.py - - - -# # job: openSource and exist auth -# openSource_exist_auth: -# name: openSource and exist auth -# runs-on: ubuntu-16.04 -# steps: -# - name: server test -# run: | - - - - - - - -# # job: business and no auth -# business_no_auth: -# name: business and no auth -# runs-on: ubuntu-16.04 -# steps: -# - name: server test -# run: | -# -# # job: business and exist auth -# business_exist_auth: -# name: business and exist auth -# runs-on: ubuntu-16.04 -# steps: -# - name: server test -# run: | \ No newline at end of file + run: pytest github_action_test.py diff --git a/github_action_test.py b/github_action_test.py index bcfffb0..efa94bd 100644 --- a/github_action_test.py +++ b/github_action_test.py @@ -19,7 +19,15 @@ def setUp(self): self.a = 1 self.b = 2 - def test_case(self): + def test_case_1(self): + """ + case run + :return: + """ + c = self.a + self.b + self.assertEqual(3, c) + + def test_case_2(self): """ case run :return: