Skip to content

Conversation

WhitWaldo
Copy link
Contributor

Added build and publish workflows on the build.yml script

@WhitWaldo WhitWaldo self-assigned this Sep 9, 2025
Copy link
Contributor

@joebowbeer joebowbeer left a comment

Choose a reason for hiding this comment

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

Some suggested changes

node-version: ${{ matrix.node_version }}

- name: Install dependencies
run: npm install
Copy link
Contributor

Choose a reason for hiding this comment

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

Use package-lock strictly

Suggested change
run: npm install
run: npm ci


- name: Run unit tests
id: tests
run: npm run test
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
run: npm run test
run: npm test

run: npm install

- name: Build package (install dependencies, lint, prettier, build)
run: npm run build
Copy link
Contributor

Choose a reason for hiding this comment

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

Strictly speaking npm run build isn't needed or used since ts-jest is running tests

But running lint here would be a good idea

registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm install
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
run: npm install
run: npm ci

run: npm install

- name: Build package
run: npm run build
Copy link
Contributor

@joebowbeer joebowbeer Sep 11, 2025

Choose a reason for hiding this comment

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

The prepack script does this build automatically when publish runs

Suggested change
run: npm run build

run: npm run build

- name: Publish to npm (@dapr/testcontainers-node)
run: npm publish dist/ --access public
Copy link
Contributor

Choose a reason for hiding this comment

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

The additional args are specified in package.json (see files and access)

Suggested change
run: npm publish dist/ --access public
run: npm publish

uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2

publish:
needs: build
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe name that job "test" since it doesn't build but it tests

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.

2 participants