Skip to content

Commit 667e951

Browse files
ci: update ci to node 20
chore: rename some scripts
1 parent d701445 commit 667e951

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v3
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
1515
with:
16-
node-version: '18'
16+
node-version: '20'
1717
cache: 'npm'
1818
- run: npm ci
1919
- run: npm run lint

.github/workflows/tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
- 27017:27017
1717
if: "!contains(github.event.head_commit.message, '[skip tests]')"
1818
steps:
19-
- uses: actions/checkout@v3
20-
- uses: actions/setup-node@v3
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-node@v4
2121
with:
22-
node-version: '18'
22+
node-version: '20'
2323
cache: 'npm'
2424
- run: npm ci
2525
- run: npm run test -- --watch=false --progress=false --browsers=ChromeHeadless
26-
- run: npm run testbe
26+
- run: npm run test:be

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM node:18-alpine
1+
FROM node:20-alpine
22

33
WORKDIR /usr/src/app
44
COPY package*.json ./
55
RUN npm ci
66
COPY . .
77
ENV MONGODB_URI mongodb://mongo:27017/angularfullstack
8-
#RUN npm run builddev
8+
#RUN npm run build:dev
99
RUN npm run build
1010
EXPOSE 3000
1111
CMD [ "npm", "start" ]

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ A window will automatically open at [localhost:4200](http://localhost:4200). Ang
3333
`npm run prod`: run the project with a production bundle listening at [localhost:3000](http://localhost:3000)
3434

3535
### Manual mode
36-
1. Build frontend: `npm run builddev` for dev or `npm run build` for prod
36+
1. Build frontend: `npm run build:dev` for dev or `npm run build` for prod
3737
2. Build backend: `npm run predev`
3838
3. Run MongoDB: `mongod`
3939
4. Run the app: `npm start`
@@ -64,7 +64,7 @@ A window will automatically open at [localhost:4200](http://localhost:4200). Ang
6464
## Running tests
6565
Run `ng test` to execute the frontend unit tests via [Karma](https://karma-runner.github.io).
6666

67-
Run `npm run testbe` to execute the backend tests via [Jest](https://jestjs.io/) (it requires `mongod` already running).
67+
Run `npm run test:be` to execute the backend tests via [Jest](https://jestjs.io/) (it requires `mongod` already running).
6868

6969
## Running linters
7070
Run `npm run lint` to execute [Angular ESLint](https://github.com/angular-eslint/angular-eslint), [HTML linting](https://github.com/htmlhint/HTMLHint) and [SASS linting](https://github.com/sasstools/sass-lint).

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"author": "Davide Violante",
66
"description": "Angular Full Stack project built using Angular 2+, Express, Mongoose and Node.",
77
"engines": {
8-
"node": ">=18",
9-
"npm": ">=8"
8+
"node": ">=20",
9+
"npm": ">=10"
1010
},
1111
"scripts": {
1212
"ng": "ng",
13-
"builddev": "ng build -c development && tsc -p server",
13+
"build:dev": "ng build -c development && tsc -p server",
1414
"build": "ng build && tsc -p server",
1515
"start": "node dist/server/app.js",
1616
"predev": "tsc -p server",
1717
"dev": "concurrently \"mongod\" \"ng serve --open\" \"tsc -w -p server\" \"nodemon dist/server/app.js\"",
1818
"prod": "concurrently \"mongod\" \"ng build && tsc -p server && node dist/server/app.js\"",
1919
"test": "ng test",
20-
"testbe": "tsc -p server && jest",
21-
"testbecov": "tsc -p server && jest --coverage",
20+
"test:be": "tsc -p server && jest",
21+
"test:becov": "tsc -p server && jest --coverage",
2222
"lint": "ng lint && htmlhint \"client/**/*.html\" && sass-lint \"client/**/*.scss\" -v",
23-
"lintfix": "ng lint --fix"
23+
"lint:fix": "ng lint --fix"
2424
},
2525
"private": true,
2626
"dependencies": {

0 commit comments

Comments
 (0)