Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move testing script run sequences to a script #548

Merged
merged 4 commits into from
Dec 22, 2022
Merged
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
28 changes: 7 additions & 21 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,18 @@ jobs:
- name: Checkout source
uses: actions/checkout@v2.3.4
- name: Install dependencies
run: |
bin/setup_base
bin/clone_model
run: bin/run_tests install_dependencies
- name: code checks
if: ${{ always() }}
run: |
bin/gencode check
pubber/bin/build check
validator/bin/build check
bin/test_pylint
run: bin/run_tests code_checks
- name: Schema conformance tests
if: ${{ always() }}
run: |
bin/test_schema -p
run: bin/run_tests schema_conformance_tests
- name: simple trace test
run: |
bin/test_trace simple
run: bin/run_tests simple_trace_test
- name: Registrar tests
if: ${{ always() }}
run: |
bin/test_registrar
bin/test_sites
run: bin/run_tests registrar_tests

redirect:
name: Endpoint Redirection
Expand All @@ -59,9 +49,7 @@ jobs:
with:
java-version: '11'
- name: base setup
run: |
bin/setup_base
bin/clone_model
run: bin/run_tests install_dependencies
- name: mosquitto connect
run: |
bin/test_mosquitto
Expand Down Expand Up @@ -111,9 +99,7 @@ jobs:
with:
java-version: '11'
- name: base setup
run: |
bin/setup_base
bin/clone_model
run: bin/run_tests install_dependencies
- name: telemetry validator
env:
GCP_TARGET_PROJECT: ${{ secrets.GCP_TARGET_PROJECT }}
Expand Down
43 changes: 43 additions & 0 deletions bin/run_tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash -e

function usage() {
>&2 cat << EOF

$0 [step]

step is one of:

install_dependencies
code_checks
schema_conformance_tests
simple_trace_test
registrar_tests
EOF
false
}

case "$1" in
install_dependencies)
bin/setup_base
bin/clone_model
;;
code_checks)
bin/gencode check
pubber/bin/build check
validator/bin/build check
bin/test_pylint
;;
schema_conformance_tests)
bin/test_schema -p
;;
simple_trace_test)
bin/test_trace simple
;;
registrar_tests)
bin/test_registrar
bin/test_sites
;;
*)
usage
;;
esac