feat: replace Bash to C# Batch #78
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
name: Test benchmark scripts | |
on: | |
pull_request: | |
branches: ["main"] | |
jobs: | |
config2matrix: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run benchmark_config2matrix | |
id: actual | |
run: bash ./.github/scripts/benchmark_config2matrix.sh --config-path ./.github/scripts/tests/template_benchmark_config.yaml | |
- name: Test | |
run: | | |
expected=$(jq -c < ./.github/scripts/tests/template_benchmark_config.json) | |
actual=$(echo '${{ steps.actual.outputs.matrix }}' | jq -c) | |
echo -n "FACT: matrix is sane as expected json. " | |
if [[ "$actual" == "$expected" ]]; then echo "[O PASS]"; else echo "[X FAIL]" && exit 1; fi | |
loader2matrix: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run benchmark_loader2matrix | |
id: actua_config | |
run: bash ./.github/scripts/benchmark_loader2matrix.sh --benchmark-name-prefix foo --config-path ./.github/scripts/tests/template_schedule_loader.yaml | |
- name: Run benchmark_loader2matrix | |
id: actual_params | |
run: bash ./.github/scripts/benchmark_loader2matrix.sh --benchmark-name-prefix foo --config-path ./.github/scripts/tests/template_benchmark_config.yaml --branch main | |
- name: Test | |
run: | | |
expected_config=$(jq -c < ./.github/scripts/tests/template_schedule_loader.json) | |
actual_config=$(echo '${{ steps.actua_config.outputs.matrix }}' | jq -c) | |
expected_params=$(jq -c < ./.github/scripts/tests/ondemand_schedule_loader.json) | |
actual_params=$(echo '${{ steps.actual_params.outputs.matrix }}' | jq -c) | |
echo -n "FACT: matrix is sane as expected json. " | |
if [[ "$actual_config" == "$expected_config" ]]; then echo "[O PASS]"; else echo "[X FAIL]" && exit 1; fi | |
if [[ "$actual_params" == "$expected_params" ]]; then echo "[O PASS]"; else echo "[X FAIL]" && exit 1; fi |