Skip to content

Commit ccce6e2

Browse files
chore(ci): consolidate ci jobs (#461)
1 parent fb82ed3 commit ccce6e2

1 file changed

Lines changed: 34 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,14 @@ env:
1414
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1515

1616
jobs:
17-
test-individual:
17+
test:
1818
runs-on: ${{ matrix.os }}
1919

2020
strategy:
2121
fail-fast: false
2222
matrix:
2323
os: [ ubuntu-latest, windows-latest, macos-latest ]
2424
node: [ 20, 22, 24 ]
25-
project:
26-
[
27-
activities-examples,
28-
ai-sdk,
29-
eager-workflow-start,
30-
early-return,
31-
empty,
32-
hello-world,
33-
mutex,
34-
nestjs-exchange-rates,
35-
sleep-for-days,
36-
timer-examples,
37-
message-passing/introduction,
38-
message-passing/safe-message-handlers,
39-
polling/infrequent
40-
]
4125
include:
4226
- os: windows-latest
4327
node: 22
@@ -64,13 +48,40 @@ jobs:
6448
cache: 'pnpm'
6549

6650
- run: pnpm install
67-
working-directory: ${{ matrix.project }}
68-
69-
- run: npm run build
70-
working-directory: ${{ matrix.project }}
7151

72-
- run: npm test
73-
working-directory: ${{ matrix.project }}
52+
- name: Build and test sample projects
53+
shell: bash
54+
run: |
55+
set +e
56+
failed=()
57+
projects=(
58+
activities-examples
59+
ai-sdk
60+
eager-workflow-start
61+
early-return
62+
empty
63+
hello-world
64+
mutex
65+
nestjs-exchange-rates
66+
sleep-for-days
67+
timer-examples
68+
message-passing/introduction
69+
message-passing/safe-message-handlers
70+
polling/infrequent
71+
)
72+
for project in "${projects[@]}"; do
73+
echo "::group::$project — build"
74+
(cd "$project" && npm run build) || failed+=("$project (build)")
75+
echo "::endgroup::"
76+
echo "::group::$project — test"
77+
(cd "$project" && npm test) || failed+=("$project (test)")
78+
echo "::endgroup::"
79+
done
80+
if [ ${#failed[@]} -ne 0 ]; then
81+
echo "Failed:"
82+
printf ' - %s\n' "${failed[@]}"
83+
exit 1
84+
fi
7485
7586
lint-format-build:
7687
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)