Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
fix: initial circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
Dara Hayes committed Jul 3, 2019
1 parent a0bc5ae commit 1ccc469
Show file tree
Hide file tree
Showing 5 changed files with 174 additions and 2 deletions.
94 changes: 94 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
version: 2.1
jobs:
build:
working_directory: ~/aerogear
docker:
# Node 8 LTS
- image: circleci/node:lts
steps:
- checkout
- run:
name: install dependencies
command: npm install
- run:
name: compile
command: npm run compile
- run:
name: test
command: npm test
- run:
name: coverage
command: npm run coverage
- run:
name: Lint all TypeScript code
command: npm run lint
# test_examples:
# docker:
# # Node 8 LTS
# - image: circleci/node:lts
# # keycloak
# - image: jboss/keycloak:3.4.3.Final
# name: keycloak_instance
# environment:
# KEYCLOAK_USER: admin
# KEYCLOAK_PASSWORD: admin
# DB_VENDOR: h2
# steps:
# - checkout
# - run:
# name: Wait for keycloak instance to start up
# command: dockerize -wait tcp://keycloak_instance:8080 -timeout 120s
# - run:
# name: install dependencies
# command: npm install
# - run:
# name: bootstrap project
# command: npm run bootstrap
# - run:
# name: compile
# command: npm run compile
# - run:
# command: cd examples && npm run test-examples
# environment:
# KEYCLOAK_HOST: 'keycloak_instance'
# KEYCLOAK_PORT: '8080'
npm_publish:
working_directory: ~/aerogear
docker:
# Node 8 LTS
- image: circleci/node:lts
steps:
- checkout
# Allows us to authenticate with the npm registry
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- run: CI=true npm run release:prep
- run: TAG=$CIRCLE_TAG npm run release:validate
- run: TAG=$CIRCLE_TAG npm run publish
workflows:
version: 2
build_and_release:
jobs:
- build:
filters:
tags:
only: /.*/
# - test_examples:
# filters:
# tags:
# only: /.*/
- npm_publish:
requires:
- build
filters:
tags:
only: /.*/ # allow anything because tag syntax is validated as part of validate-release.sh
branches:
ignore: /.*/
# - publish_example_containers:
# requires:
# - npm_publish
# filters:
# tags:
# only: /.*/
# branches:
# ignore: /.*/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist

# Build stuff
coverage
.nyc_output
14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"compile": "tsc --build tsconfig.json",
"watch": "tsc --build tsconfig.json --watch",
"compile:clean": "tsc --build tsconfig.json --clean",
"test": "ava -v"
"test": "nyc ava -v",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"lint": "tslint '*/*/src/**/*.ts' --exclude 'src/**/*.test.ts' && tslint -c tslint_tests.json 'src/**/*.test.ts'"
},
"dependencies": {
"apollo-server-express": "2.6.7",
Expand All @@ -37,12 +39,20 @@
"@types/node": "10.14.10",
"@types/pino": "5.20.0",
"ava": "2.1.0",
"ts-node": "8.3.0",
"coveralls": "^3.0.4",
"nyc": "^14.1.1",
"ts-node": "^8.3.0",
"tslint": "^5.18.0",
"typescript": "3.5.2"
},
"peerDependencies": {
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0"
},
"nyc": {
"extension": [
".ts"
]
},
"ava": {
"compileEnhancements": false,
"extensions": [
Expand Down
56 changes: 56 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"extends": "tslint:recommended",
"linterOptions": {
"exclude": [
"node_modules/**"
]
},
"rules": {
"semicolon": [
true,
"never"
],
"quotemark": [
true,
"single"
],
"max-line-length": [false],
"space-before-function-paren": [false, "always"],
"only-arrow-functions": [
false
],
"trailing-comma": [
true,
{
"multiline": "never",
"singleline": "never"
}
],
"arrow-parens": false,
"object-literal-sort-keys": false,
"object-literal-key-quotes": [
false
],
"max-classes-per-file": [
false
],
"ban-types": [
false
],
"no-console": [
true,
"log"
],
"variable-name": [
true,
"ban-keywords",
"check-format",
"allow-pascal-case",
"allow-leading-underscore"
],
"interface-name": [
false
],
"ordered-imports": false
}
}
11 changes: 11 additions & 0 deletions tslint_tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tslint.json",
"rules": {
"no-shadowed-variable": [
true,
{
"temporalDeadZone": false
}
]
}
}

0 comments on commit 1ccc469

Please sign in to comment.