Skip to content

Commit

Permalink
chore(ci): add sanity checks for log raw data test
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin committed Jan 17, 2024
1 parent e962739 commit d6b8e0c
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ jobs:
shell: bash
timeout-minutes: 10
run: |
if ! rg '^' "${{ matrix.safe_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }'
if ! rg '^' "${{ matrix.local_safe_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }'
then
echo "We are logging an extremely large data"
exit 1
Expand All @@ -644,6 +644,17 @@ jobs:
exit 1
fi
# sanity check
if ! rg '^' "${{ matrix.local_safe_path }}"/*/*/logs | awk 'length($0) > 1000 { print; exit 1 }'
then
echo "Sanity check pass for local safe path"
fi
# the wan log dir contains: testnet/machine/node(or faucet)/node_name/logs
if ! rg '^' "${{ matrix.wan_logs_path }}"/*/*/*/*/logs | awk 'length($0) > 1000 { print; exit 1 }'
then
echo "Sanity check pass for wan logs"
fi
# - name: post notification to slack on failure
# if: ${{ failure() }}
# uses: bryannice/[email protected]
Expand Down Expand Up @@ -810,7 +821,7 @@ jobs:
shell: bash
timeout-minutes: 10
run: |
if ! rg '^' "${{ matrix.safe_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }'
if ! rg '^' "${{ matrix.local_safe_path }}"/*/*/logs | awk 'length($0) > 15000 { print; exit 1 }'
then
echo "We are logging an extremely large data"
exit 1
Expand All @@ -822,6 +833,17 @@ jobs:
exit 1
fi
# sanity check
if ! rg '^' "${{ matrix.local_safe_path }}"/*/*/logs | awk 'length($0) > 1000 { print; exit 1 }'
then
echo "Sanity check pass for local safe path"
fi
# the wan log dir contains: testnet/machine/node(or faucet)/node_name/logs
if ! rg '^' "${{ matrix.wan_logs_path }}"/*/*/*/*/logs | awk 'length($0) > 1000 { print; exit 1 }'
then
echo "Sanity check pass for wan logs"
fi
# - name: post notification to slack on failure
# if: ${{ failure() }}
# uses: bryannice/[email protected]
Expand Down

0 comments on commit d6b8e0c

Please sign in to comment.