Skip to content

Commit

Permalink
fix: notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
auricom committed Jan 31, 2025
1 parent 94bdacc commit 16cd9e3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/build-applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -460,14 +460,23 @@ jobs:
"https://api.github.com/repos/${REPO}/actions/runs/${PREVIOUS_RUN_ID}/jobs" \
| jq -r --arg JOB_NAME "$JOB_NAME" '.jobs[] | select(.name == $JOB_NAME) | .conclusion')
echo "previous_status=${PREVIOUS_STATUS}" >> $GITHUB_OUTPUT
echo "previous_status=${PREVIOUS_STATUS}"
if [[ -z "$PREVIOUS_STATUS" ]]; then
echo "notify_step=false" >> $GITHUB_ENV
exit 0
fi
if [[ "$PREVIOUS_STATUS" == "failure" && "$APP_STATUS" == "success" ]]; then
echo "notify_step=true" >> $GITHUB_ENV
elif [[ "$PREVIOUS_STATUS" == "success" && "$APP_STATUS" == "failure" ]]; then
echo "notify_step=true" >> $GITHUB_ENV
else
echo "notify_step=false" >> $GITHUB_ENV
fi
- name: Notify Slack
if: |
inputs.sendNotifications == true &&
(
(env.app_status == 'true' && steps.previous-run.outputs.previous_status == 'failure') ||
(env.app_status != 'true' && steps.previous-run.outputs.previous_status == 'success')
)
if: ${{ inputs.sendNotifications == 'true' && env.notify_step == 'true' }}
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # v2.3.2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
Expand Down
6 changes: 6 additions & 0 deletions apps/cosmos-sdk-v2/ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ set -x

BINARY_PATH=$(find $(go env GOPATH)/bin | grep $BINARY_NAME | tail -n 1)

# Rename the binary as makefile is not consistent
mv "${BINARY_PATH}" "${BINARY_PATH}v2"

# Set the timeout to 60 seconds
TIMEOUT=60
START_TIME=$(date +%s)

cd ${MATRIX_APP_REPOSITORY}
make init-simapp-v2

# Rename the binary as makefile is not consistent
mv "${BINARY_PATH}v2" "${BINARY_PATH}"
${BINARY_PATH} start > ./output.log 2>1 &
APP_PID=$!

Expand Down

0 comments on commit 16cd9e3

Please sign in to comment.