Skip to content

Commit

Permalink
chore(stark-all): upgrade project engine from NodeJS-12_npm-7 to Node…
Browse files Browse the repository at this point in the history
…JS-14_npm-8

Adapt CI to use NodeJS 14 and 16. Set NodeJS 14 as the MAIN version.

BREAKING CHANGE:
The minimum versions for NodeJS and npm are now:
  - NodeJS: v14.20.0
  - npm: v8.19.1
  • Loading branch information
SuperITMan committed Jul 18, 2023
1 parent e6735a5 commit ca333ce
Show file tree
Hide file tree
Showing 21 changed files with 13,686 additions and 9,400 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ on:

env:
TZ: "Europe/Brussels"
MAIN_NODEJS: "12"
NPM_VERSION: "7.12.1"
MAIN_NODEJS: "14"
NPM_VERSION: "8.19.1"
LOGS_DIR: /tmp/stark/logs
LOGS_FILE: /tmp/stark/logs/build-perf.log
HUSKY: 0
Expand All @@ -26,7 +26,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ["12", "14"]
node_version: ["14", "16"]
os: [ubuntu-latest]

steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bump-angular-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
TZ: "Europe/Brussels"
NPM_VERSION: "7.12.1"
NPM_VERSION: "8.19.1"
LOGS_DIR: /tmp/stark/logs
LOGS_FILE: /tmp/stark/logs/build-perf.log

Expand All @@ -19,10 +19,10 @@ jobs:
UPDATED_DEPS: 0
steps:
# See: https://github.com/marketplace/actions/setup-node-js-environment
- name: Use Node.js 12
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 14

# See: https://github.com/marketplace/actions/cache
# See doc: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dependabot-sync-stark-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- completed
env:
TZ: "Europe/Brussels"
NPM_VERSION: "7.12.1"
NPM_VERSION: "8.19.1"
LOGS_DIR: /tmp/stark/logs
LOGS_FILE: /tmp/stark/logs/build-perf.log

Expand All @@ -23,10 +23,10 @@ jobs:
name: Sync deps
steps:
# See: https://github.com/marketplace/actions/setup-node-js-environment
- name: Use Node.js 12
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 14

# See: https://github.com/marketplace/actions/cache
# See doc: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.22.1
14.20.0
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ TODO add project structure details

If you want to build Stark from source, you need to...

- install NodeJS (12.22.0+) and npm (7.12.1+)
- install NodeJS (14.20.0+) and npm (8.19.1+)
- clone this git repository: `git clone https://github.com/NationalBankBelgium/stark.git`
- run `npm install` from the root directory of Stark
- run `npm run install:all` from the root directory of Stark (this command will also install and build all Stark packages)
Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ That script makes some checks then, if all succeed it publishes the API docs of

Checks that are performed:

- node version: should be "10"
- node version: should be "14"
- GITHUB_REPOSITORY should be "NationalBankBelgium/stark"
- GH_ACTIONS_TAG should be defined and not empty (this is the case when GitHub Actions builds for a tag)
- GITHUB_EVENT_NAME should be different of "pull_request"
Expand All @@ -95,7 +95,7 @@ That script makes some checks then, if all succeed, it publishes the different p

Checks that are performed:

- node version: should be "10"
- node version: should be "14"
- NPM_TOKEN environment variable should be defined
- GITHUB_REPOSITORY should be "NationalBankBelgium/stark"
- GH_ACTIONS_TAG should be defined and not empty (this is the case when GitHub Actions builds for a tag)
Expand Down
6 changes: 3 additions & 3 deletions docs/GITHUB_ACTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All the information about this action can be found on [github.com/marketplace/ac
### actions/setup-node@v2

This official action can be used to install a specific version of NodeJS in the virtual machine.
It requires the parameter `node-version: '12'` with any version of node.
It requires the parameter `node-version: '14'` with any version of node.

In Stark build, we execute our tests/build with multiple versions of NodeJS thanks to `strategy.matrix`. See:

Expand All @@ -24,7 +24,7 @@ name: Build and test on Node.js ${{ matrix.node_version }}
runs-on: ubuntu-latest
strategy:
matrix:
node_version: ["12", "14"]
node_version: ["14", "16"]

steps:
- name: Use Node.js ${{ matrix.node_version }}
Expand Down Expand Up @@ -186,7 +186,7 @@ To define our variable, we populate the `GITHUB_ENV` variable with the definitio
```yaml
- name: Set environment variable 'IS_MAIN_ENVIRONMENT'
run: |
if [[ '${{ matrix.node_version }}' == '12' ]] && [[ '${{ matrix.os }}' == 'ubuntu-latest' ]]; then
if [[ '${{ matrix.node_version }}' == '14' ]] && [[ '${{ matrix.os }}' == 'ubuntu-latest' ]]; then
echo "IS_MAIN_ENVIRONMENT=1" >> $GITHUB_ENV
else
echo "IS_MAIN_ENVIRONMENT=0" >> $GITHUB_ENV
Expand Down
Loading

0 comments on commit ca333ce

Please sign in to comment.