Skip to content

Commit c1cf902

Browse files
Add plugins matrix job to CI for tsc, lint, prettier, and build (#15)
* Add plugins matrix job to CI for tsc, lint, prettier, and build Runs yarn install --immutable, type checking, linting, formatting check, and build for each plugin workspace in parallel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com> * Disable fail-fast, add plugins-check job, and disable prettier step Allow all matrix jobs to complete independently and add a gate job to verify all passed. Temporarily disable prettier:check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com> * Add .github/ drift check to plugins matrix job Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com> * Split plugins matrix into a separate CI workflow Move the plugins matrix and plugins-check jobs out of ci.yaml into a dedicated ci-plugins.yaml workflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com> --------- Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 34e2a8f commit c1cf902

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

.github/workflows/ci-plugins.yaml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI plugins
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
plugins:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
workspace:
20+
- backstage-1.42
21+
- backstage-1.45
22+
# - backstage-1.49
23+
# - backstage-1.52
24+
25+
steps:
26+
- name: Harden runner
27+
uses: step-security/harden-runner@v2
28+
with:
29+
egress-policy: audit
30+
31+
- name: Checkout
32+
uses: actions/checkout@v7
33+
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version-file: plugins/${{ matrix.workspace }}/package.json
38+
39+
- name: Install dependencies
40+
run: yarn install --immutable
41+
working-directory: plugins/${{ matrix.workspace }}
42+
43+
- name: TypeScript type check
44+
run: yarn tsc
45+
working-directory: plugins/${{ matrix.workspace }}
46+
47+
- name: Lint
48+
run: yarn lint:all
49+
working-directory: plugins/${{ matrix.workspace }}
50+
51+
# - name: Check formatting
52+
# run: yarn prettier:check
53+
# working-directory: plugins/${{ matrix.workspace }}
54+
55+
- name: Build
56+
run: yarn build:all
57+
working-directory: plugins/${{ matrix.workspace }}
58+
59+
- name: Verify no changes in .github/
60+
run: |
61+
if [ -n "$(git status --porcelain .github/)" ]; then
62+
echo "::error::Unexpected changes detected in .github/ after CI steps:"
63+
git diff .github/
64+
exit 1
65+
fi
66+
echo "No changes in .github/ — OK"
67+
68+
plugins-check:
69+
if: always()
70+
needs: plugins
71+
runs-on: ubuntu-latest
72+
73+
steps:
74+
- name: Harden runner
75+
uses: step-security/harden-runner@v2
76+
with:
77+
egress-policy: audit
78+
79+
- name: Verify all plugin matrix jobs passed
80+
run: |
81+
if [ "${{ needs.plugins.result }}" != "success" ]; then
82+
echo "::error::One or more plugin matrix jobs failed"
83+
exit 1
84+
fi

0 commit comments

Comments
 (0)