-
-
Notifications
You must be signed in to change notification settings - Fork 53
testing parallel builds #1202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testing parallel builds #1202
Changes from all commits
73551c0
73bf2fd
559f4bd
ad85ba1
b01e66c
403d164
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,21 +7,77 @@ on: | |
| - 'src/**' # Only run when files in this directory change | ||
| - 'styles/**' | ||
| - 'package.json' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| setup: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| node-modules-cache: ${{ steps.cache.outputs.cache-hit }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| - name: Install dependencies | ||
| run: npm ci | ||
|
Comment on lines
+20
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion
Each downstream job re-installs dependencies even though 🤖 Prompt for AI Agents |
||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| needs: setup | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Test | ||
| run: npm test | ||
|
|
||
| build_css: | ||
| runs-on: ubuntu-latest | ||
| needs: test | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Clean dist | ||
| run: npm run clean | ||
| - name: Build CSS | ||
| run: npm run build:css | ||
|
|
||
| build_components: | ||
| runs-on: ubuntu-latest | ||
| needs: test | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Clean dist | ||
| run: npm run clean | ||
| - name: Build Components | ||
| run: npm run build:components | ||
|
|
||
| build: | ||
| runs-on: ubuntu-latest | ||
| needs: [build_css, build_components] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
| - name: Build Complete | ||
| run: echo "Build finished. CSS and components built in parallel after tests." | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken
outputsreference – workflow will fail at runtimesteps.cache.outputs.cache-hitpoints to a step ID that doesn’t exist.Because the
actions/setup-nodestep has noid, the expression resolves tonulland the whole job definition is syntactically invalid – GitHub Actions will refuse to run the workflow.Fix by either (a) removing the unnecessary custom output or (b) giving the
setup-nodestep anidand referencing that:Without this change the whole workflow is dead-on-arrival.
🧰 Tools
🪛 actionlint (1.7.7)
18-18: property "cache" is not defined in object type {}
(expression)
🤖 Prompt for AI Agents