mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
ci: control development and CI version of Node.js via .nvmrc (#11708)
This commit is contained in:
parent
5a28729b2e
commit
5d02f06fcb
8
.github/workflows/commit-validation.yml
vendored
8
.github/workflows/commit-validation.yml
vendored
@ -31,8 +31,8 @@ jobs:
|
||||
src-or-tests: &src-or-tests
|
||||
- *src
|
||||
- .github/workflows/test/**/*
|
||||
- .github/workflows/**/*
|
||||
- .mocharc.json
|
||||
- .nvmrc
|
||||
- .nycrc.json
|
||||
|
||||
lint: &lint
|
||||
@ -48,7 +48,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 20
|
||||
node-version-file: .nvmrc
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npm run format:ci
|
||||
@ -64,7 +64,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 20
|
||||
node-version-file: .nvmrc
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
|
||||
@ -76,7 +76,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 20
|
||||
node-version-file: .nvmrc
|
||||
- run: npm ci
|
||||
- run: npm run compile
|
||||
- uses: actions/upload-artifact@v4
|
||||
|
||||
2
.github/workflows/preview.yml
vendored
2
.github/workflows/preview.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 20
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
2
.github/workflows/publish-package.yml
vendored
2
.github/workflows/publish-package.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 20
|
||||
node-version-file: .nvmrc
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
- run: npm ci
|
||||
- run: npm run package
|
||||
|
||||
14
DEVELOPER.md
14
DEVELOPER.md
@ -50,7 +50,17 @@ cd typeorm
|
||||
git remote add upstream https://github.com/typeorm/typeorm.git
|
||||
```
|
||||
|
||||
## Installing NPM Modules
|
||||
## Node
|
||||
|
||||
You should have node installed in the version described in [.nvmrc](.nvmrc).
|
||||
|
||||
It is recommended to configure your OS to automatically switch to use this version whenever you enter project folder. This can be achieved in many ways:
|
||||
|
||||
* [`fnm`](https://github.com/Schniz/fnm)
|
||||
* [`zsh-nvm`](https://github.com/lukechilds/zsh-nvm#auto-use)
|
||||
* [`asdf`](https://asdf-vm.com) with `asdf-nodejs` plugin and [`legacy_version_file = true`](https://asdf-vm.com/manage/configuration.html#legacy-version-file) option
|
||||
|
||||
## Installing package dependencies
|
||||
|
||||
Install all TypeORM dependencies by running this command:
|
||||
|
||||
@ -89,7 +99,7 @@ You can copy this tar into your project and run `npm install ./typeorm-x.x.x.tgz
|
||||
|
||||
## Running Tests Locally
|
||||
|
||||
It is greatly appreciated if PRs that change code come with appropriate tests.
|
||||
It is greatly appreciated if PRs that change code come with appropriate tests.
|
||||
|
||||
To create a new test, check the [relevant functional tests](https://github.com/typeorm/typeorm/tree/master/test/functional). Depending on the test, you may need to create a new test file or modify an existing one.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user