mirror of
https://github.com/OpenCTI-Platform/opencti.git
synced 2025-12-22 08:17:08 +00:00
[ci] Move pycti-examples from Drone to Github actions (#13361)
This commit is contained in:
@@ -280,6 +280,7 @@ steps:
|
||||
- client-test-311
|
||||
|
||||
# always run the examples last since they don't clean up
|
||||
# ---------> already done in Github Actions
|
||||
- name: pycti-example-tests
|
||||
image: python:3.12
|
||||
environment:
|
||||
@@ -290,7 +291,7 @@ steps:
|
||||
- pip3 install -r requirements.txt --user
|
||||
- pip3 install .
|
||||
- cd examples/
|
||||
- /bin/bash run_all.sh
|
||||
- /bin/bash run_all.sh
|
||||
depends_on:
|
||||
- client-test-312
|
||||
|
||||
|
||||
31
.github/workflows/ci-test-client-python.yml
vendored
31
.github/workflows/ci-test-client-python.yml
vendored
@@ -62,15 +62,30 @@ jobs:
|
||||
-v ${{ github.workspace }}:/home/workspace \
|
||||
-e OPENCTI_API_URL=http://opencti-pycti-start:4100 \
|
||||
-e OPENCTI_API_TOKEN=bfa014e0-e02e-4aa6-a42b-603b19dcf159 \
|
||||
python:${{ matrix.python-version }} \
|
||||
sh -c 'set -ex;
|
||||
cd /home/workspace/client-python
|
||||
pip3 install -r requirements.txt --user
|
||||
pip3 install -r test-requirements.txt --user
|
||||
sleep 180
|
||||
python3 -m pytest --no-header -vv --disable-warnings --cov=pycti --drone
|
||||
'
|
||||
python:${{ matrix.python-version }} \
|
||||
sh -c 'set -ex;
|
||||
cd /home/workspace/client-python
|
||||
pip3 install -r requirements.txt --user
|
||||
pip3 install -r test-requirements.txt --user
|
||||
sleep 180
|
||||
python3 -m pytest --no-header -vv --disable-warnings --cov=pycti --drone
|
||||
'
|
||||
|
||||
- name: Run pycti example tests
|
||||
run: |
|
||||
docker run --network runner-docker-network \
|
||||
--name pycti-example-tests \
|
||||
-v ${{ github.workspace }}:/home/workspace \
|
||||
-e OPENCTI_API_URL=http://opencti-pycti-start:4100 \
|
||||
-e OPENCTI_API_TOKEN=bfa014e0-e02e-4aa6-a42b-603b19dcf159 \
|
||||
python:${{ matrix.python-version }} \
|
||||
sh -c 'set -ex;
|
||||
cd /home/workspace/client-python
|
||||
pip3 install -r test-requirements.txt --user
|
||||
pip3 install .
|
||||
cd examples/
|
||||
/bin/bash run_all.sh
|
||||
'
|
||||
|
||||
- name: Logs opencti-pycti-start
|
||||
if: always()
|
||||
|
||||
Reference in New Issue
Block a user