Skip to content

Conversation

@Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Feb 12, 2025

The GitHub Action workflows have been updated based on the module template.

The changes made from the template are:

  • There are no tests, so the test step from "build-lint-test" was removed.
  • The "build" step is now run on three Node.js versions rathern than just one. In the template we rely more on tests for compatibility, but that won't work with no tests of course.
  • The "build" step in the build-lint workflow builds the demo, not the package. There is no build step for the package, it's not in TypeScript (yet).
  • The build step was removed from the publishing workflow, and the "build artifact" storage was removed (we have no build artifacts to store).
  • The API doc publishing was removed (this repo uses the gh-pages branch for the demo).
  • The changelog doesn't use Prettier formatting yet (this requires more lint tooling/config updates).

The changes made from the previous workflows in this repository are:

  • Automated npm publishing
  • Removed "require additional reviewer" workflow (we've stopped using this)
  • Additional workflow linting
  • Updated vertions of various actions
  • Update base image to ubuntu-latest
  • Add Node.js v22.x to the test matrix
  • Add checks for a dirty working tree

Additionally, the "publish-gh-pages" workflow was updated to use the same "checkout, install Node.js, and install dependencies" steps as elsewhere. This workflow has no analog in the module template.

@Gudahtt Gudahtt force-pushed the update-github-action-workflows branch 3 times, most recently from f109323 to 3edae66 Compare February 12, 2025 20:07
The GitHub Action workflows have been updated based on the module
template.

The changes made from the template are:
* There are no tests, so the test step from "build-lint-test" was
removed.
* The "build" step is now run on three Node.js versions rathern than
just one. In the template we rely more on tests for compatibility, but
that won't work with no tests of course.
* The "build" step builds the demo, not the package. There is no build step
for the package, it's not in TypeScript (yet).
* The API doc publishing was removed (this repo uses the `gh-pages` branch
for the demo).
* The changelog doesn't use Prettier formatting yet (this requires more lint
tooling/config updates).

The changes made from the previous workflows in this repository are:
* Automated npm publishing
* Removed "require additional reviewer" workflow (we've stopped using this)
* Additional workflow linting
* Updated vertions of various actions
* Update base image to `ubuntu-latest`
* Add Node.js v22.x to the test matrix
* Add checks for a dirty working tree

Additionally, the "publish-gh-pages" workflow was updated to use the same
"checkout, install Node.js, and install dependencies" steps as elsewhere. This
workflow has no analog in the module template.
@Gudahtt Gudahtt force-pushed the update-github-action-workflows branch from 3edae66 to 23bccc9 Compare February 12, 2025 20:10
@Gudahtt Gudahtt marked this pull request as ready for review February 12, 2025 20:11
publish-npm:
needs: publish-npm-dry-run
runs-on: ubuntu-latest
environment: npm-publish
Copy link
Member Author

Choose a reason for hiding this comment

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

A new npm-publish environment and access token has been setup for this.

build-lint:
name: Build and Lint
env:
INFURA_PROJECT_ID: ${{ secrets.INFURA_PROJECT_ID }}
Copy link
Member Author

Choose a reason for hiding this comment

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

This was already unused (and not setup in repo settings). Must have been added by mistake.

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

One comment about package.json.

"convert": "node scripts/convert.js",
"demo": "node demo/build.js",
"demo:all": "yarn demo --all",
"lint": "yarn lint:eslint && yarn lint:misc --check",
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth adding lint:changelog to lint too?

Suggested change
"lint": "yarn lint:eslint && yarn lint:misc --check",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:changelog",

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah right, I meant to comment on this. I considered this change, but I noticed the changelog lint is run redundantly in our workflows now in the module template.

It's run once as part of yarn lint (with the --rc flag always unset), then it's run again with the correct --rc flag set (depending on the branch it's run on).

@NidhiKJha NidhiKJha merged commit 6d70495 into main Feb 13, 2025
17 checks passed
@NidhiKJha NidhiKJha deleted the update-github-action-workflows branch February 13, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants