Skip to content

Commit

Permalink
ci: update ci to node 20
Browse files Browse the repository at this point in the history
chore: rename some scripts
  • Loading branch information
DavideViolante committed Aug 31, 2024
1 parent d701445 commit 667e951
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run lint
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- 27017:27017
if: "!contains(github.event.head_commit.message, '[skip tests]')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run test -- --watch=false --progress=false --browsers=ChromeHeadless
- run: npm run testbe
- run: npm run test:be
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM node:18-alpine
FROM node:20-alpine

WORKDIR /usr/src/app
COPY package*.json ./
RUN npm ci
COPY . .
ENV MONGODB_URI mongodb://mongo:27017/angularfullstack
#RUN npm run builddev
#RUN npm run build:dev
RUN npm run build
EXPOSE 3000
CMD [ "npm", "start" ]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ A window will automatically open at [localhost:4200](http://localhost:4200). Ang
`npm run prod`: run the project with a production bundle listening at [localhost:3000](http://localhost:3000)

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

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

## Running linters
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).
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
"author": "Davide Violante",
"description": "Angular Full Stack project built using Angular 2+, Express, Mongoose and Node.",
"engines": {
"node": ">=18",
"npm": ">=8"
"node": ">=20",
"npm": ">=10"
},
"scripts": {
"ng": "ng",
"builddev": "ng build -c development && tsc -p server",
"build:dev": "ng build -c development && tsc -p server",
"build": "ng build && tsc -p server",
"start": "node dist/server/app.js",
"predev": "tsc -p server",
"dev": "concurrently \"mongod\" \"ng serve --open\" \"tsc -w -p server\" \"nodemon dist/server/app.js\"",
"prod": "concurrently \"mongod\" \"ng build && tsc -p server && node dist/server/app.js\"",
"test": "ng test",
"testbe": "tsc -p server && jest",
"testbecov": "tsc -p server && jest --coverage",
"test:be": "tsc -p server && jest",
"test:becov": "tsc -p server && jest --coverage",
"lint": "ng lint && htmlhint \"client/**/*.html\" && sass-lint \"client/**/*.scss\" -v",
"lintfix": "ng lint --fix"
"lint:fix": "ng lint --fix"
},
"private": true,
"dependencies": {
Expand Down

0 comments on commit 667e951

Please sign in to comment.