Skip to content
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

CI: Split gh workflow generate commands into a matrix #463

Merged
merged 23 commits into from
Oct 27, 2023

Conversation

jackw
Copy link
Collaborator

@jackw jackw commented Oct 16, 2023

What this PR does / why we need it:
This PR splits the generate-<pluginType> commands into a matrix to try to improve the times and also so we can run commands as individual steps against the scaffolded plugin rather than doing it as a one liner of npm exec nx run @grafana/create-plugin:generate-app-backend && (cd ./packages/create-plugin/generated && npm install && npm run build && npm run lint && mage -v build:linux).

To speed up these tasks further we need to figure out what is going on with npm ci which seems to be taking ages.

Before
Screenshot 2023-10-17 at 12 09 29
After
Screenshot 2023-10-17 at 12 09 41

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@jackw jackw added chore Other changes that don't modify src or test files no-changelog Don't include in changelog and version calculations labels Oct 16, 2023
@jackw jackw self-assigned this Oct 16, 2023
@github-actions
Copy link

github-actions bot commented Oct 16, 2023

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs.

@jackw jackw changed the title WIP: speed up CI WIP: Improve CI Oct 16, 2023
@jackw jackw changed the title WIP: Improve CI CI: Split gh workflow generate commands into a matrix Oct 17, 2023
Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments/questions here. In general it LGTM 👍

.github/workflows/ci.yml Outdated Show resolved Hide resolved

generate-plugins:
name: Test plugin scaffolding
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it's better to use a label for this? Also, why would you want to skip the CI?

Copy link
Collaborator Author

@jackw jackw Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow runs on push and when a package in this repo is published we push changes to main and the commit message contains these strings so we can bypass unnecessary workflow runs.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@andresmgot
Copy link
Contributor

LGTM!

@jackw jackw merged commit f3a8bed into main Oct 27, 2023
10 checks passed
@jackw jackw deleted the jackw/gh-action-matrix branch October 27, 2023 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Other changes that don't modify src or test files no-changelog Don't include in changelog and version calculations
Projects
Development

Successfully merging this pull request may close these issues.

2 participants