@novorender/devops-test-node-lib v1.0.98
Node Library
A sample node library with CI.
Installation
- Create a .npmrc file in the user folder. Add the following 2 lines of code, replace "personal-access-token" with a token that has read permission to the package.
@novorender:registry=https://npm.pkg.github.com/ //npm.pkg.github.com/:_authToken="personal-access-token"
- Install
- Latest version.
$ npm i devops-test-node-lib
- Specific version.
$ npm i devops-test-node-lib@1.0.1
- Next/Pre-Release version.
$ npm i devops-test-node-lib@next
- Latest version.
Usage
Include this line in the file that you want to use the library
import { hello } from "@novorender/devops-test-node-lib";
Test
Clone the repository to a local directory
$ git clone https://github.com/novorender/devops-test-node-lib
$ cd devops-test-node-lib
Run the tests
$ npm i
$ npm test
Continuous Integration (CI)
- On every commit/push to the main branch:
- Code is built.
- Unit tests are run. If the tests fail, the GitHub actions aborts and you can see the workflow details under actions.
- Code coverage check is done.
- On every commit/push to the main branch with a version tag:
- Code is built.
- Unit tests are run. If the tests fail, the GitHub actions aborts and you can see the workflow details under actions.
- Code coverage check is done.
- A new package is published to github packages.
- Provides the ability to publish to npm registry (public). You will need to create a release, please go to Publishing.
Versioning
When you ready with your changes and want to publish a new package, then you can release a Major/Minor/Patch version. In order to do that, run the following set of commands
Bump Version
$ npm version [major | minor | patch | prerelease]
If current version is 1.0.1, then the following applies 1. major changes the version to 2.0.0 2. minor changes the version to 1.1.0 3. patch changes the version to 1.0.2 4. prerelease changes the version to 1.0.2-0
Push Version to Main Branch
$ git push
Publishing
When you are ready to release to the public domain, then follow the below to do so.
1. Navigate to the repository.
2. Click on "Releases" link below the "About" block.
3. Click on "Draft a new release".
4. Choose a tag (generally this will be the last tag that was created when you issued the npm version command).
5. Click on "Publish release". All packages are released to the public npm registry.
6. Navigate to registry npm.
7. Enter "@novorender/devops-test-node-lib" in the search bar and press enter.
8. The package page should be diplayed.
9. Confirm that the latest version is the one that you released.
Licensing
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago