Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 37 additions & 66 deletions .github/workflows/rocksdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- master
# 1次/3天 在凌晨一点触发执行任务
schedule:
- cron: '0 13 */3 * *'
- cron: '0 17 */3 * *'
# 手动触发
workflow_dispatch:

Expand All @@ -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: |
run: pytest github_action_test.py
10 changes: 9 additions & 1 deletion github_action_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down