Skip to content

Commit fb83f91

Browse files
.github/workflows: Migrate workflows to Blacksmith runners (#4504)
Co-authored-by: blacksmith-sh[bot] <157653362+blacksmith-sh[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <[email protected]>
1 parent e2516eb commit fb83f91

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

.github/actions/slack-notify/action.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,17 @@ runs:
2323
run: |
2424
echo "Parsing job results..."
2525
failed_list=""
26-
27-
# Parse the JSON and extract failed jobs
26+
2827
echo '${{ inputs.failed-jobs }}' | jq -r 'to_entries[] | select(.value.result == "failure") | .key' | while read job; do
2928
case $job in
3029
"check-translations") failed_list="${failed_list}❌ Translation check\n" ;;
3130
"knip") failed_list="${failed_list}❌ Knip analysis\n" ;;
3231
"compile") failed_list="${failed_list}❌ Compile & lint\n" ;;
33-
"platform-unit-test") failed_list="${failed_list}❌ Unit tests\n" ;;
32+
"unit-test") failed_list="${failed_list}❌ Unit tests\n" ;;
3433
"integration-test") failed_list="${failed_list}❌ Integration tests\n" ;;
3534
esac
3635
done
37-
38-
# Remove trailing newline and save to output
36+
3937
echo "failed_jobs<<EOF" >> $GITHUB_OUTPUT
4038
echo -e "$failed_list" | sed '/^$/d' >> $GITHUB_OUTPUT
4139
echo "EOF" >> $GITHUB_OUTPUT
@@ -47,14 +45,14 @@ runs:
4745
channel: ${{ inputs.channel }}
4846
text: |
4947
🚨 ${{ inputs.workflow-name }} workflow failed on main branch!
50-
48+
5149
Repository: ${{ github.repository }}
5250
Commit: ${{ github.sha }}
5351
Author: ${{ github.actor }}
54-
52+
5553
Failed jobs:
5654
${{ steps.parse-jobs.outputs.failed_jobs }}
57-
55+
5856
View details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
5957
env:
60-
SLACK_WEBHOOK_URL: ${{ inputs.webhook-url }}
58+
SLACK_WEBHOOK_URL: ${{ inputs.webhook-url }}

.github/workflows/code-qa.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
check-translations:
13-
runs-on: ubuntu-latest
13+
runs-on: blacksmith-4vcpu-ubuntu-2404
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
@@ -20,7 +20,7 @@ jobs:
2020
run: node scripts/find-missing-translations.js
2121

2222
knip:
23-
runs-on: ubuntu-latest
23+
runs-on: blacksmith-4vcpu-ubuntu-2404
2424
steps:
2525
- name: Checkout code
2626
uses: actions/checkout@v4
@@ -30,7 +30,7 @@ jobs:
3030
run: pnpm knip
3131

3232
compile:
33-
runs-on: ubuntu-latest
33+
runs-on: blacksmith-4vcpu-ubuntu-2404
3434
steps:
3535
- name: Checkout code
3636
uses: actions/checkout@v4
@@ -41,11 +41,16 @@ jobs:
4141
- name: Check types
4242
run: pnpm check-types
4343

44-
platform-unit-test:
44+
unit-test:
45+
name: platform-unit-test (${{ matrix.name }})
4546
runs-on: ${{ matrix.os }}
4647
strategy:
4748
matrix:
48-
os: [ubuntu-latest, windows-latest]
49+
include:
50+
- os: blacksmith-4vcpu-ubuntu-2404
51+
name: ubuntu-latest
52+
- os: windows-latest
53+
name: windows-latest
4954
steps:
5055
- name: Checkout code
5156
uses: actions/checkout@v4
@@ -70,7 +75,7 @@ jobs:
7075
fi
7176
7277
integration-test:
73-
runs-on: ubuntu-latest
78+
runs-on: blacksmith-4vcpu-ubuntu-2404
7479
needs: [check-openrouter-api-key]
7580
if: needs.check-openrouter-api-key.outputs.exists == 'true'
7681
steps:
@@ -87,7 +92,7 @@ jobs:
8792

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

0 commit comments

Comments
 (0)