-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[automation_test] add automation test action
- Loading branch information
Showing
3 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: automation_test | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
DEEPFLOW_SERVER_IMAGE_TAG: | ||
description: 'server image tag' | ||
required: false | ||
default: 'latest' | ||
DEEPFLOW_AGENT_IMAGE_TAG: | ||
description: 'agent image tag' | ||
required: false | ||
default: 'latest' | ||
PYTEST_XDIST_WORKER_NUMBER: | ||
description: 'Worker number, recommend 3-6' | ||
required: true | ||
default: '3' | ||
PYTEST_DF_ENV_NUMBER: | ||
description: 'Deepflow env number, recommend 1-3' | ||
required: true | ||
default: '1' | ||
TEST_CASE: | ||
description: 'case name' | ||
required: false | ||
default: 'all' | ||
BRANCH: | ||
description: 'df-test branch ' | ||
required: false | ||
default: 'master' | ||
DF_ENVS_FIXED: | ||
description: 'Does test case need server, 1 means no server required' | ||
required: false | ||
default: '0' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 200 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Pip | ||
run: | | ||
python -m ensurepip --default-pip | ||
python -m pip install --upgrade pip | ||
- name: Install Sio | ||
run: | | ||
pip install -r automation_test/requirements.txt | ||
- name: set environment vars | ||
run: | | ||
echo "LC_ALL=en_US.utf8" >> $GITHUB_ENV | ||
echo "PYTEST_XDIST_WORKER_NUMBER=${{ github.event.inputs.PYTEST_XDIST_WORKER_NUMBER }}" >> $GITHUB_ENV | ||
echo "PYTEST_DF_ENV_NUMBER=${{ github.event.inputs.PYTEST_DF_ENV_NUMBER }}" >> $GITHUB_ENV | ||
echo "TEST_CASE=${{ github.event.inputs.TEST_CASE }}" >> $GITHUB_ENV | ||
echo "DEEPFLOW_SERVER_IMAGE_TAG=${{ github.event.inputs.DEEPFLOW_SERVER_IMAGE_TAG }}" >> $GITHUB_ENV | ||
echo "DEEPFLOW_AGENT_IMAGE_TAG=${{ github.event.inputs.DEEPFLOW_AGENT_IMAGE_TAG }}" >> $GITHUB_ENV | ||
echo "NO_REPORT=${{ github.event.inputs.BRANCH }}" >> $GITHUB_ENV | ||
echo "DF_ENVS_FIXED=${{ github.event.inputs.DF_ENVS_FIXED }}" >> $GITHUB_ENV | ||
# - name: Setup Debug Session | ||
# uses: csexton/debugger-action@master | ||
- name: run client | ||
run: python3 automation_test/ws_client.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
python-socketio==5.8.0 | ||
requests==2.31.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters