Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ jobs:
runs-on: ubuntu-latest
needs: [integration-tests]
if: always() && github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository
outputs:
summary: ${{ steps.set-test-summary.outputs.summary }}

steps:
- name: Checkout code
Expand All @@ -197,7 +199,6 @@ jobs:
- name: Set release version env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV


- name: Add variables and upload test results
if: always()
run: |
Expand All @@ -213,12 +214,24 @@ jobs:
LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}

- name: Generate test summary and save to output
id: set-test-summary
run: |
filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
test_output=$(python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}")
{
echo 'summary<<EOF'
echo "$test_output"
echo EOF
} >> "$GITHUB_OUTPUT"

notify-slack:
runs-on: ubuntu-latest
needs: [integration-tests]
needs: [integration-tests, process-upload-report]
if: ${{ (success() || failure()) }} # Run even if integration tests fail and only on main repository
steps:
- name: Notify Slack
id: main_message
uses: slackapi/slack-github-action@v2.0.0
with:
method: chat.postMessage
Expand All @@ -229,7 +242,7 @@ jobs:
- type: section
text:
type: mrkdwn
text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* ${{ needs.integration-tests.result == 'success' && ':white_check_mark:' || ':failed:' }}"
- type: divider
- type: section
fields:
Expand All @@ -247,4 +260,15 @@ jobs:
- type: context
elements:
- type: mrkdwn
text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"

- name: Test summary thread
if: success()
uses: slackapi/slack-github-action@v2.0.0
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
thread_ts: "${{ steps.main_message.outputs.ts }}"
text: "${{ needs.process-upload-report.outputs.summary }}"