Skip to content

adding checker script to ci #5

adding checker script to ci

adding checker script to ci #5

Workflow file for this run

name: Checker Script CI
on:
pull_request:
branches:
- main
- master
jobs:
run-checker:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code from the repository
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Set up Rust environment (required for cargo stylus commands)
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
# Step 3: Install the wasm32-unknown-unknown target
- name: Install wasm32-unknown-unknown target
run: rustup target add wasm32-unknown-unknown
# Step 4: Reinstall Rust to ensure the toolchain is properly configured
- name: Reinstall Rust toolchain
run: |
rustup install stable
rustup default stable
# Step 5: Install cargo-stylus
- name: Install cargo-stylus
run: cargo install cargo-stylus
# Step 6: Make checker.sh executable
- name: Make checker.sh executable
run: chmod +x ./checker.sh
# Step 7: Run the checker.sh script (it will fetch the latest SDK version)
- name: Run checker script
run: ./checker.sh
# Step 8: Check for the existence of check_results.log and fail if missing
- name: Ensure check_results.log exists
run: |
if [ ! -f check_results.log ]; then
echo "check_results.log not found! Failing the check."
exit 1
fi
# Step 9: Check for issues in the log file
- name: Check for issues in the log
run: |
if grep -q "FAILED" check_results.log; then
echo "Checker script failed! Fix the issues before merging."
exit 1
else
echo "Checker script passed! Ready to merge."
fi