Skip to content

Commit

Permalink
ci(core): post to test channel when triggering the job manually.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpaulucci committed Jan 16, 2025
1 parent 21eb55e commit 674fae0
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl -X POST $url \
curl -X POST $1 \
-H 'Content-Type: application/json; charset=utf-8' \
--data @- <<EOF
$(jq -n --arg text "$(cat results.md)" '{
Expand All @@ -15,7 +15,7 @@ $(jq -n --arg text "$(cat results.md)" '{
"text": {
"type": "mrkdwn",
"text": $text
}
}
}
]
}')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
curl -X POST $url \
curl -X POST $1 \
-H 'Content-Type: application/json; charset=utf-8' \
--data "$(cat cmd/ef_tests/levm/levm_ef_tests_summary_slack.txt)"
4 changes: 2 additions & 2 deletions .github/scripts/publish_levm_hive.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl -X POST $url \
curl -X POST $1 \
-H 'Content-Type: application/json; charset=utf-8' \
--data @- <<EOF
$(jq -n --arg text "$(cat results.md)" '{
Expand All @@ -15,7 +15,7 @@ $(jq -n --arg text "$(cat results.md)" '{
"text": {
"type": "mrkdwn",
"text": $text
}
}
}
]
}')
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/publish_loc.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
curl -X POST $url \
curl -X POST $1 \
-H 'Content-Type: application/json; charset=utf-8' \
--data "$(cat loc_report_slack.txt)"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl -X POST $url \
curl -X POST $1 \
-H 'Content-Type: application/json; charset=utf-8' \
--data @- <<EOF
$(jq -n --arg text "$(cat diff.md)" '{
Expand Down
35 changes: 15 additions & 20 deletions .github/workflows/daily_loc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,19 @@ jobs:
echo "# 'ethrex' lines of code report" >> $GITHUB_STEP_SUMMARY
cat loc_report_github.txt >> $GITHUB_STEP_SUMMARY
- name: Post results to ethrex L1 slack channel
- name: Post results to Slack
env:
url: ${{ secrets.ETHREX_L1_SLACK_WEBHOOK }}
run: sh .github/scripts/publish_loc.sh

- name: Post results to ethrex L2 slack channel
env:
url: ${{ secrets.ETHREX_L2_SLACK_WEBHOOK }}
run: sh .github/scripts/publish_loc.sh

- name: Post results to levm slack channel
env:
url: ${{ secrets.LEVM_SLACK_WEBHOOK }}
run: sh .github/scripts/publish_loc.sh

# This is left commented out to ease debugging later on.
# Comment out all the other "Post to * slack channel" directives
# - name: Post results to test slack channel
# env:
# url: ${{ secrets.TEST_CHANNEL_SLACK }}
# run: sh .github/scripts/publish_loc.sh
SLACK_WEBHOOKS: >
${{ github.event_name == 'workflow_dispatch'

Check failure on line 60 in .github/workflows/daily_loc.yaml

View workflow job for this annotation

GitHub Actions / Lint

got unexpected character '?' while lexing expression, expecting 'a'..'z', 'A'..'Z', '_', '0'..'9', ''', '}', '(', ')', '[', ']', '.', '!', '<', '>', '=', '&', '|', '*', ',', ' '
? secrets.TEST_CHANNEL_SLACK
: format(
'{0}, {1}, {2}',
secrets.ETHREX_REPORTS_SLACK_WEBHOOK,
secrets.ETHREX_L2_SLACK_WEBHOOK,
secrets.LEVM_SLACK_WEBHOOK
)
}}
run: |
for webhook in $SLACK_WEBHOOKS; do
sh .github/scripts/publish_loc.sh "$webhook"
done
62 changes: 33 additions & 29 deletions .github/workflows/daily_reports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
if-no-files-found: error

hive-report:
name: Generate report and upload to slack (${{ matrix.vm }})
name: Generate report and upload to Slack (${{ matrix.vm }})
needs: run-hive
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -102,25 +102,26 @@ jobs:
echo "# Hive coverage report (${{ matrix.vm }})" >> $GITHUB_STEP_SUMMARY
cat results.md >> $GITHUB_STEP_SUMMARY
- name: Post results to ethrex L1 slack channel
- name: Post results to Slack
env:
url: ${{ secrets.ETHREX_L1_SLACK_WEBHOOK }}
run: sh .github/scripts/publish.sh

- name: Post results to ethrex L2 slack channel
env:
url: ${{ secrets.ETHREX_L2_SLACK_WEBHOOK }}
run: sh .github/scripts/publish.sh

- name: Post results to levm slack channel
env:
url: ${{ secrets.LEVM_SLACK_WEBHOOK }}
SLACK_WEBHOOKS: >
${{ github.event_name == 'workflow_dispatch'

Check failure on line 108 in .github/workflows/daily_reports.yaml

View workflow job for this annotation

GitHub Actions / Lint

got unexpected character '?' while lexing expression, expecting 'a'..'z', 'A'..'Z', '_', '0'..'9', ''', '}', '(', ')', '[', ']', '.', '!', '<', '>', '=', '&', '|', '*', ',', ' '
? secrets.TEST_CHANNEL_SLACK
: format(
'{0}, {1}, {2}',
secrets.ETHREX_REPORTS_SLACK_WEBHOOK,
secrets.LEVM_SLACK_WEBHOOK
)
}}
SCRIPT: >
${{ matrix.vm == 'levm'

Check failure on line 117 in .github/workflows/daily_reports.yaml

View workflow job for this annotation

GitHub Actions / Lint

got unexpected character '?' while lexing expression, expecting 'a'..'z', 'A'..'Z', '_', '0'..'9', ''', '}', '(', ')', '[', ']', '.', '!', '<', '>', '=', '&', '|', '*', ',', ' '
? '.github/scripts/publish_levm_hive.sh'
: '.github/scripts/publish_hive.sh'
}}
run: |
if [ "${{ matrix.vm }}" = "revm" ]; then
sh .github/scripts/publish.sh
elif [ "${{ matrix.vm }}" = "levm" ]; then
sh .github/scripts/publish_levm_hive.sh
fi
for webhook in $SLACK_WEBHOOKS; do
sh $SCRIPT "$webhook"
done
hive-diff-report:
name: Post tests diff to levm slack
Expand All @@ -142,13 +143,17 @@ jobs:
name: results_revm.md
path: ./results_revm.md

- name: Post results diff in LEVM channel
- name: Post results diff to Slack
env:
url: ${{ secrets.LEVM_SLACK_WEBHOOK }}
SLACK_WEBHOOK: >
${{ github.event_name == 'workflow_dispatch'

Check failure on line 149 in .github/workflows/daily_reports.yaml

View workflow job for this annotation

GitHub Actions / Lint

got unexpected character '?' while lexing expression, expecting 'a'..'z', 'A'..'Z', '_', '0'..'9', ''', '}', '(', ')', '[', ']', '.', '!', '<', '>', '=', '&', '|', '*', ',', ' '
? secrets.TEST_CHANNEL_SLACK
: secrets.LEVM_SLACK_WEBHOOK
}}
run: |
bash .github/scripts/levm_revm_diff.sh results_revm.md results_levm.md >> diff.md
cat diff.md >> $GITHUB_STEP_SUMMARY
bash .github/scripts/publish_revm_levm_diff.sh
sh .github/scripts/publish_vms_diff.sh $SLACK_WEBHOOK
levm-test:
name: Generate Report for LEVM EF Tests
Expand Down Expand Up @@ -180,12 +185,11 @@ jobs:
echo "# Daily LEVM EF Tests Run Report" >> $GITHUB_STEP_SUMMARY
cat cmd/ef_tests/levm/levm_ef_tests_summary_github.txt >> $GITHUB_STEP_SUMMARY
# - name: Post results to ethrex L2 slack channel
# env:
# url: ${{ secrets.ETHREX_L2_SLACK_WEBHOOK }}
# run: sh .github/scripts/publish_levm_ef_tests_summary.sh

- name: Post results to levm slack channel
- name: Post results to Slack
env:
url: ${{ secrets.LEVM_SLACK_WEBHOOK }}
run: sh .github/scripts/publish_levm_ef_tests_summary.sh
SLACK_WEBHOOK: >
${{ github.event_name == 'workflow_dispatch'

Check failure on line 191 in .github/workflows/daily_reports.yaml

View workflow job for this annotation

GitHub Actions / Lint

got unexpected character '?' while lexing expression, expecting 'a'..'z', 'A'..'Z', '_', '0'..'9', ''', '}', '(', ')', '[', ']', '.', '!', '<', '>', '=', '&', '|', '*', ',', ' '
? secrets.TEST_CHANNEL_SLACK
: secrets.LEVM_SLACK_WEBHOOK
}}
run: sh .github/scripts/publish_levm_ef_tests.sh $SLACK_WEBHOOK

0 comments on commit 674fae0

Please sign in to comment.