https://github.com/devenes/node-js-ci
Continuous Integration with Node.js using GitHub Actions to test your NPM packages
https://github.com/devenes/node-js-ci
devdependencies express github github-actions jest js node nodejs npm supertest
Last synced: 4 months ago
JSON representation
Continuous Integration with Node.js using GitHub Actions to test your NPM packages
- Host: GitHub
- URL: https://github.com/devenes/node-js-ci
- Owner: devenes
- License: mit
- Created: 2022-04-27T11:06:52.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-28T09:40:56.000Z (about 3 years ago)
- Last Synced: 2025-01-03T15:44:11.520Z (5 months ago)
- Topics: devdependencies, express, github, github-actions, jest, js, node, nodejs, npm, supertest
- Language: JavaScript
- Homepage:
- Size: 192 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node Server with Express
[](https://github.com/devenes/node-js-ci/actions/workflows/node.js.yml) [](https://github.com/devenes/node-js-ci/actions/workflows/docker.x.yml) [](https://github.com/devenes/node-js-ci/actions/workflows/node.js.scan.yml)  
## Continuous Integration with Node.js using GitHub Actions

### Define your branch name and the actions you want to trigger to start your job
- Push
```
push:
branches: [main]
```- Pull Request
```
pull_request:
branches: [main]
```### Define your job name and the environment to build your code
```
jobs:
build:
runs-on: ubuntu-latest
```### Define the Node versions to test your code on
```
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
```### Define your CI steps under your job
```
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm run build --if-present
- run: npm test
```