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: add workflows and cli-style #52

Merged
merged 11 commits into from
Jan 23, 2025
Merged

ci: add workflows and cli-style #52

merged 11 commits into from
Jan 23, 2025

Conversation

KaiVandivier
Copy link
Collaborator

@KaiVandivier KaiVandivier commented Jan 21, 2025

Adds workflows:

  1. test-and-release:
    1. on pushes, runs commit linting with @dhis2/cli-style, regular code linting, unit tests, (optional e2e tests)
    2. Then runs the semantic-release action which will execute on release branches to cut a new version, then publish to the App Hub and GitHub
    3. This will also push an artifact to d2-ci
  2. deploy-pr: on PRs, deploys a preview dev version on Netlify
  3. lint-pr-title: makes sure it matches conventional commit format
  4. comment-and-close: If someone opens up an issue on this repo, a bot will close it and direct the opener to Jira

Adds style tools:

  1. ESLint for functional linting
    1. NB: Many lines were flagged under import/extensions, max-params, and no-unused-vars; I made those 'warning'-level issues in .eslintrc.js to avoid blocking the PR
  2. Prettier for code style
  3. Husky hooks to lint on commits: check commit format and run d2-style linters

I tried adding stylelint, but I think there's a bug with it that causes it to throw errors 🤔

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Jan 21, 2025

🚀 Deployed on https://pr-52.climate-app.netlify.dhis2.org

@amcgee amcgee requested review from amcgee and turban January 21, 2025 15:47
Copy link
Member

@amcgee amcgee left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@KaiVandivier
Copy link
Collaborator Author

I made one functional refactor to satisfy the no-async-promise-executor rule for ESlint -- @turban The diff is a bit hard to read because of the indenting changes, but it'd be good to have a look and make sure that's still working 🙂

Copy link
Contributor

@turban turban left a comment

Choose a reason for hiding this comment

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

LGTM. The promise refactor works fine.

@turban turban merged commit 901033a into main Jan 23, 2025
3 checks passed
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 1.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants