-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7105 from drew2a/feature/7093
Add `scripttest.yml`
- Loading branch information
Showing
16 changed files
with
224 additions
and
78 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
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,23 @@ | ||
name: timeout | ||
description: Start COMMAND, and kill it if still running after DURATION | ||
inputs: | ||
command: | ||
default: 'echo command is not specified' | ||
description: 'A command to run under given timeout' | ||
required: true | ||
|
||
duration: | ||
default: '10s' | ||
description: 'A duration for command to run' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Run Scripts | ||
shell: bash | ||
run: | | ||
timeout --foreground -s SIGKILL ${{inputs.duration}} ${{inputs.command}} || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi | ||
# codes: | ||
# * 124 (timeout) | ||
# * 0 (success) |
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
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,84 @@ | ||
name: Scripts Test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
python-version: | ||
default: 3.8 | ||
type: string | ||
required: false | ||
|
||
duration: | ||
default: 10s | ||
type: string | ||
required: false | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Create python environment | ||
uses: ./.github/actions/pyenv | ||
with: | ||
python-version: ${{inputs.python-version}} | ||
requirements: requirements-core.txt | ||
|
||
- name: Set PYTHONPATH | ||
run: | | ||
echo "PYTHONPATH=${PYTHONPATH}:./src" >> $GITHUB_ENV | ||
- name: run_bandwidth_crawler.py | ||
uses: ./.github/actions/timeout | ||
with: | ||
command: python ./scripts/bandwidth_crawler/run_bandwidth_crawler.py --fragile | ||
duration: ${{inputs.duration}} | ||
|
||
- name: run_exit_node.py | ||
uses: ./.github/actions/timeout | ||
env: | ||
HELPER_INDEX: 1000 | ||
HELPER_BASE: 2000 | ||
with: | ||
command: python ./scripts/exit_node/run_exit_node.py --testnet --fragile | ||
duration: ${{inputs.duration}} | ||
|
||
#experiments | ||
|
||
- name: hidden_peer_discovery.py | ||
uses: ./.github/actions/timeout | ||
with: | ||
command: python ./scripts/experiments/tunnel_community/hidden_peer_discovery.py --fragile | ||
duration: ${{inputs.duration}} | ||
|
||
- name: speed_test_e2e.py | ||
uses: ./.github/actions/timeout | ||
with: | ||
command: python ./scripts/experiments/tunnel_community/speed_test_e2e.py --fragile | ||
duration: ${{inputs.duration}} | ||
|
||
- name: speed_test_exit.py | ||
uses: ./.github/actions/timeout | ||
with: | ||
command: python ./scripts/experiments/tunnel_community/speed_test_exit.py --fragile | ||
duration: ${{inputs.duration}} | ||
|
||
#seedbox | ||
|
||
- name: generate_test_data.py | ||
run: | | ||
python ./scripts/seedbox/generate_test_data.py --destination=./test_data --count=10 | ||
- name: disseminator.py | ||
uses: ./.github/actions/timeout | ||
with: | ||
command: python ./scripts/seedbox/disseminator.py --source=./test_data --fragile --testnet | ||
duration: ${{inputs.duration}} | ||
|
||
- name: seeder.py | ||
uses: ./.github/actions/timeout | ||
with: | ||
command: python ./scripts/seedbox/seeder.py --source=./test_data --testnet | ||
duration: ${{inputs.duration}} |
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
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
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
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
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
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
Oops, something went wrong.