Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add http_api scripts for CI.
Browse files Browse the repository at this point in the history
chrysanthemum-boy committed Apr 16, 2024
1 parent a0a1e84 commit 2d8635d
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -62,17 +62,21 @@ jobs:
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec infinity_build bash -c "cd /infinity/python && python3 setup.py install"

- name: Start infinity pysdk debug version
- name: Start infinity pysdk & http_api debug version
if: ${{ !cancelled() && !failure() }}
run: |
# Run a command in the background
sudo docker exec infinity_build bash -c "cd /infinity/ && rm -fr /tmp/infinity && cmake-build-debug/src/infinity > debug.log 2>&1" &
- name: pysdk debug version
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec infinity_build bash -c "cd /infinity/ && python3 tools/run_pysdk_test.py"
run: sudo docker exec infinity_build bash -c "cd /infinity/ && python3 tools/run_pysdk_test.py" && sleep 1s

- name: Stop infinity pysdk debug
- name: http_api debug version
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec infinity_build bash -c "cd /infinity/ && python3 tools/run_http_api.py" && sleep 1s

- name: Stop infinity pysdk & http_api debug
if: ${{ !cancelled() }} # always run this step even if previous steps failed
run: sudo kill $(pidof cmake-build-debug/src/infinity) && sleep 5s

@@ -139,17 +143,21 @@ jobs:
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec infinity_build bash -c "cd /infinity/python && rm -fr dist/* && python setup.py sdist bdist_wheel && pip uninstall -y infinity-sdk && pip install dist/*.whl"

- name: Start infinity pysdk release version
- name: Start infinity pysdk & http_api release version
if: ${{ !cancelled() && !failure() }}
run: |
# Run a command in the background
sudo docker exec infinity_build bash -c "cd /infinity/ && rm -fr /tmp/infinity && cmake-build-release/src/infinity > release.log 2>&1" &
- name: pysdk release version
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec infinity_build bash -c "cd /infinity/ && python3 tools/run_pysdk_test.py"
run: sudo docker exec infinity_build bash -c "cd /infinity/ && python3 tools/run_pysdk_test.py" && sleep 1s

- name: http_api release version
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec infinity_build bash -c "cd /infinity/ && python3 tools/run_http_api.py" && sleep 1s

- name: Stop infinity pysdk release
- name: Stop infinity pysdk & http_api release
if: ${{ !cancelled() }} # always run this step even if previous steps failed
run: sudo kill $(pidof cmake-build-release/src/infinity) && sleep 5s

0 comments on commit 2d8635d

Please sign in to comment.