Skip to content

Commit

Permalink
github workflow nodejs CI (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmozharov authored Oct 17, 2023
1 parent 7e92ce2 commit be4c38b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Node.js CI

on:
push:

env:
NODE_ENV: test

jobs:
build:
runs-on: ubuntu-20.04

strategy:
matrix:
node-version: [18.18]

steps:
- uses: actions/checkout@v3

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Check for formatting
run: npm run format:check

- name: Check for linting
run: npm run lint:check

- name: Run tests
run: npm test

- name: Runt e2e tests
run: npm run test:e2e
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
{
"name": "aqueduct-backend",
"version": "0.0.1",
"description": "",
"author": "",
"description": "Backend for Aqueduct app",
"author": "Vladislav Mozharov <[email protected]>",
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint:check": "eslint \"{src,apps,libs,test}/**/*.ts\"",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"engines": {
"node": ">=18.18.0"
},
"dependencies": {
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
Expand Down

0 comments on commit be4c38b

Please sign in to comment.