Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(ci): refactor CI and upgrade actions#10294

Merged
dlabaj merged 1 commit intopatternfly:mainfrom
jonkoops:upgrade-ci
Apr 30, 2024
Merged

chore(ci): refactor CI and upgrade actions#10294
dlabaj merged 1 commit intopatternfly:mainfrom
jonkoops:upgrade-ci

Conversation

Copy link
Contributor

jonkoops commented Apr 22, 2024 *
edited
Loading

Splits the PR preview action into two distinct actions, one to build and deploy the documentation for the PR, and another to do the CI tasks such as linting, testing and building. The latter workflow no longer requires the pull_request_target to run, which limits access to repository secrets.

These workflows are now use a composite action to take care of the repetitive task of setting up Node.js, installing dependencies and running the build. The release workflow has been converted to re-use the CI and documentation workflows to reduce duplication.

I've ran the CI on this on my fork for testing, which you can see the result of here:

Push on main
CI -- https://github.com/jonkoops/patternfly-react/actions/runs/8819259805
Release (includes docs) -- https://github.com/jonkoops/patternfly-react/actions/runs/8819259882

Pull request
CI -- https://github.com/jonkoops/patternfly-react/actions/runs/8819461879
Documentation -- https://github.com/jonkoops/patternfly-react/actions/runs/8819461789/job/24210724184

jonkoops marked this pull request as draft April 22, 2024 12:12
jonkoops force-pushed the upgrade-ci branch from 9574614 to 5377a3d Compare April 22, 2024 12:16
Copy link
Collaborator

patternfly-build commented Apr 22, 2024 *
edited
Loading

jonkoops marked this pull request as ready for review April 22, 2024 12:45
nicolethoen requested review from dlabaj, nicolethoen and wise-king-sullyman April 22, 2024 12:49
jonkoops marked this pull request as draft April 22, 2024 20:05
jonkoops force-pushed the upgrade-ci branch from 5377a3d to 52d1421 Compare April 22, 2024 20:07
jonkoops changed the title chore(ci): split PR preview action and upgrade deps chore(ci): refactor CI and upgrade actions Apr 22, 2024
jonkoops force-pushed the upgrade-ci branch 2 times, most recently from d090156 to d006998 Compare April 23, 2024 11:26
jonkoops commented Apr 23, 2024
"clean:exports": "lerna run clean:exports --parallel --stream",
"generate": "yarn plop",
"lint": "node --max-old-space-size=4096 node_modules/.bin/eslint --ext js,jsx,ts,tsx --cache",
"lint": "node --max-old-space-size=4096 node_modules/.bin/eslint --ext js,jsx,ts,tsx --cache --cache-strategy content",
Copy link
Contributor Author

jonkoops Apr 23, 2024

Choose a reason for hiding this comment

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

Since Git doesn't track timestamps on files for modifications, the linter cache would not work. I've set this to check the file contents instead, which is slower, but will actually hit the cache.

jonkoops force-pushed the upgrade-ci branch from d006998 to 2c9880a Compare April 24, 2024 15:56
jonkoops marked this pull request as ready for review April 24, 2024 15:56
jonkoops force-pushed the upgrade-ci branch from 2c9880a to 964ae11 Compare April 24, 2024 15:58
jonkoops commented Apr 24, 2024
Comment on lines -11 to -14
const owner = process.env.CIRCLE_PROJECT_USERNAME || ghrepo.split('/')[0]; // patternfly
const repo = process.env.CIRCLE_PROJECT_REPONAME || ghrepo.split('/')[1];
const prnum = process.env.CIRCLE_PR_NUMBER || process.env.GH_PR_NUM;
const prbranch = process.env.CIRCLE_BRANCH || process.env.GITHUB_REF.split('/').pop();
Copy link
Contributor Author

jonkoops Apr 24, 2024

Choose a reason for hiding this comment

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

Circle CI isn't used anymore, so I've removed references to environment variables related to it.

jonkoops force-pushed the upgrade-ci branch from 964ae11 to b28ebbf Compare April 24, 2024 16:04
jonkoops force-pushed the upgrade-ci branch from b28ebbf to 60efffb Compare April 24, 2024 16:07
wise-king-sullyman approved these changes Apr 26, 2024
Copy link
Collaborator

wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

This is incredible

jonkoops reacted with heart emoji
dlabaj approved these changes Apr 30, 2024
Copy link
Contributor

dlabaj left a comment

Choose a reason for hiding this comment

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

LGTM

dlabaj merged commit 07e0116 into patternfly:main Apr 30, 2024
Copy link
Contributor Author

jonkoops commented Apr 30, 2024

Thanks y'all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

dlabaj dlabaj approved these changes

wise-king-sullyman wise-king-sullyman approved these changes

nicolethoen Awaiting requested review from nicolethoen

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants