File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,7 +104,9 @@ jobs:
104104 shell : bash
105105
106106 - name : Validate Zulip configuration
107- if : always() && inputs.notify == 'zulip'
107+ id : validate-zulip
108+ if : (success() || failure()) && inputs.notify == 'zulip'
109+ continue-on-error : true
108110 env :
109111 ZULIP_ORG_URL : ${{ inputs.zulip-org-url }}
110112 ZULIP_API_KEY : ${{ secrets.zulip-api-key }}
@@ -119,7 +121,7 @@ jobs:
119121 fi
120122
121123 - name : Send Zulip notification on success
122- if : success() && inputs.notify == 'zulip'
124+ if : success() && inputs.notify == 'zulip' && steps.validate-zulip.outcome == 'success'
123125 uses : zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5
124126 with :
125127 api-key : ${{ secrets.zulip-api-key }}
@@ -132,7 +134,7 @@ jobs:
132134 ✅ nanoda daily verification [succeeded](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) on `${{ github.sha }}`
133135
134136 - name : Send Zulip notification on failure
135- if : failure() && inputs.notify == 'zulip'
137+ if : steps.lean-action.outcome == ' failure' && inputs.notify == 'zulip' && steps.validate-zulip.outcome == 'success '
136138 uses : zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5
137139 with :
138140 api-key : ${{ secrets.zulip-api-key }}
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ echo "Checking environment with nanoda external type checker"
99handle_exit () {
1010 exit_status=$?
1111
12+ # Close the log group before cleanup
13+ echo " ::endgroup::"
14+
1215 # Always cleanup temporary files/directories
1316 echo " Cleaning up temporary files..."
1417 rm -rf _lean4export _nanoda_lib _nanoda_export.txt _nanoda_config.json
@@ -18,12 +21,17 @@ handle_exit() {
1821 echo " ::error::nanoda check failed"
1922 else
2023 echo " nanoda-status=SUCCESS" >> " $GITHUB_OUTPUT "
21- echo " ::endgroup::"
2224 echo
2325 fi
2426}
2527trap handle_exit EXIT
2628
29+ # Check for conflicting directories before we start
30+ if [ -d " _lean4export" ] || [ -d " _nanoda_lib" ]; then
31+ echo " ::error::Directories _lean4export or _nanoda_lib already exist. Please remove them before running nanoda."
32+ exit 1
33+ fi
34+
2735# Step 1: Install Rust if not present
2836echo " Checking for Rust installation..."
2937if ! command -v cargo & > /dev/null; then
You can’t perform that action at this time.
0 commit comments