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
16 changes: 7 additions & 9 deletions .github/actions/slack-notify/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,17 @@ runs:
run: |
echo "Parsing job results..."
failed_list=""

# Parse the JSON and extract failed jobs

echo '${{ inputs.failed-jobs }}' | jq -r 'to_entries[] | select(.value.result == "failure") | .key' | while read job; do
case $job in
"check-translations") failed_list="${failed_list}❌ Translation check\n" ;;
"knip") failed_list="${failed_list}❌ Knip analysis\n" ;;
"compile") failed_list="${failed_list}❌ Compile & lint\n" ;;
"platform-unit-test") failed_list="${failed_list}❌ Unit tests\n" ;;
"unit-test") failed_list="${failed_list}❌ Unit tests\n" ;;
"integration-test") failed_list="${failed_list}❌ Integration tests\n" ;;
esac
done

# Remove trailing newline and save to output

echo "failed_jobs<<EOF" >> $GITHUB_OUTPUT
echo -e "$failed_list" | sed '/^$/d' >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
Expand All @@ -47,14 +45,14 @@ runs:
channel: ${{ inputs.channel }}
text: |
🚨 ${{ inputs.workflow-name }} workflow failed on main branch!

Repository: ${{ github.repository }}
Commit: ${{ github.sha }}
Author: ${{ github.actor }}

Failed jobs:
${{ steps.parse-jobs.outputs.failed_jobs }}

View details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
env:
SLACK_WEBHOOK_URL: ${{ inputs.webhook-url }}
SLACK_WEBHOOK_URL: ${{ inputs.webhook-url }}
19 changes: 12 additions & 7 deletions .github/workflows/code-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
check-translations:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -20,7 +20,7 @@ jobs:
run: node scripts/find-missing-translations.js

knip:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -30,7 +30,7 @@ jobs:
run: pnpm knip

compile:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -41,11 +41,16 @@ jobs:
- name: Check types
run: pnpm check-types

platform-unit-test:
unit-test:
name: platform-unit-test (${{ matrix.name }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: blacksmith-4vcpu-ubuntu-2404
name: ubuntu-latest
- os: windows-latest
name: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -70,7 +75,7 @@ jobs:
fi

integration-test:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
needs: [check-openrouter-api-key]
if: needs.check-openrouter-api-key.outputs.exists == 'true'
steps:
Expand All @@ -87,7 +92,7 @@ jobs:

notify-slack-on-failure:
runs-on: ubuntu-latest
needs: [check-translations, knip, compile, platform-unit-test, integration-test]
needs: [check-translations, knip, compile, unit-test, integration-test]
if: ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(needs.*.result, 'failure') }}
steps:
- name: Checkout code
Expand Down
Loading