Skip to content

Instantly share code, notes, and snippets.

View dchima's full-sized avatar
📜
lost in code, like scholars of old.

Daniel Chima dchima

📜
lost in code, like scholars of old.
View GitHub Profile

Integrating CircleCI with Coveralls

Prerequisite

  • First, we need a set up node project. I'm currently running a graphql project of my own. it's a boilerplate project with no controller code. All we need is a project with a running server.
  • We need to run tests. code coverage works by calculating the percentage of your source code covered in tests. you can read more about code coverage here.

For this project we will run an index test. A simple check to see that one thing equals another.

Continuous Integration with CircleCI

in your root folder, add these three files

/Dokerfile

#base image
FROM node:12.2.0-alpine

# set working directory
WORKDIR /app
@dchima
dchima / GitCommitEmoji.md
Created February 23, 2020 17:29 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@dchima
dchima / ts-dependencies.md
Last active February 23, 2020 17:24
typescript module dependencies for linting, babel, and build
  1. for runing server side node script with alias paths setup
npm install --save-dev tsconfig-paths 

usage in script for packaje.json

"start:dev": "nodemon --watch 'src/**/*.ts' --exec ts-node -r tsconfig-paths/register src/index.ts"
@dchima
dchima / .babelrc
Created February 23, 2020 17:03
babel config for typescript
{
"presets": [
"@babel/typescript",
"@babel/env"
],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread"
]
}
@dchima
dchima / .eslintrc
Created February 23, 2020 17:03
.eslintrc config for typescript
{
"root": true,
"env": {
"node": true,
"es6": true
},
"extends": [
"airbnb-base",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
@dchima
dchima / tsconfig.json
Created February 23, 2020 16:59
optimal tsconfig setup
{
"compilerOptions": {
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["es6", "dom"],
"allowSyntheticDefaultImports": true,
"rootDir": ".",
"noEmit": true,
"target": "es6",