Skip to content

Commit

Permalink
Showing 5 changed files with 96 additions and 51 deletions.
66 changes: 53 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#

version: 2

defaults: &defaults
working_directory: ~/fabrix
docker:
- image: circleci/node:10.0.0
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: ""
- image: circleci/postgres:9.6.2-alpine
environment:
POSTGRES_DB: Sequelize
POSTGRES_USER: root
POSTGRES_PASSWORD: ""

jobs:
build:
working_directory: ~/fabrix
docker:
- image: circleci/node:10.0.0
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: ""
- image: circleci/postgres:9.6.2-alpine
environment:
POSTGRES_DB: Sequelize
POSTGRES_USER: root
POSTGRES_PASSWORD: ""
test:
<<: *defaults
steps:
- checkout
- run:
@@ -31,7 +40,7 @@ jobs:
- ./node_modules
- run:
name: test
command: 'npm test'
command: npm test
- run:
name: code-coverage
command: './node_modules/.bin/nyc report --reporter=text-lcov'
@@ -43,3 +52,34 @@ jobs:
prefix: coverage
- store_test_results:
path: test-results.xml
- persist_to_workspace:
root: ~/fabrix
paths: .
deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/fabrix
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/fabrix/.npmrc
- run:
name: Publish package
command: npm publish

workflows:
version: 2
test-deploy:
jobs:
- test:
filters:
tags:
only: /^v.*/
- deploy:
requires:
- test
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
[![Build Status][ci-image]][ci-url]
[![Test Coverage][coverage-image]][coverage-url]
[![Dependency Status][daviddm-image]][daviddm-url]
[![Follow @fabrix-app on Twitter][twitter-image]][twitter-url]
[![Follow @FabrixApp on Twitter][twitter-image]][twitter-url]

[![Waffle.io - Columns and their card count](https://badge.waffle.io/fabrix-app/spool-sequelize.svg?columns=all)](https://waffle.io/fabrix-app/spool-sequelize)

37 changes: 0 additions & 37 deletions lib/archetype/config/database.js

This file was deleted.

12 changes: 12 additions & 0 deletions lib/archetype/src/config/models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Database Configuration
* (app.config.database)
*
* Configure the ORM layer, connections, etc.
*
* @see {@link http://fabrixjs.io/doc/config/models}
*/
export const models = {
defaultStore: 'sqlitedev',
migrate: 'alter'
}
30 changes: 30 additions & 0 deletions lib/archetype/src/config/stores.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Database Configuration
* (app.config.database)
*
* Configure the ORM layer, connections, etc.
*
* @see {@link http://fabrixjs.io/doc/config/stores}
*/
export const stores = {

/**
* Define the database stores. A store is typically a single database.
*
* Use the SQLite3 by default for development purposes.
*
* Set production connection info in config/env/production.js
*/

/**
* Define a store called "local" which uses SQLite3 to persist data.
*/
/*
sqlitedev: {
database: 'dev',
storage: './.tmp/dev.sqlite',
host: '127.0.0.1',
dialect: 'sqlite'
}
*/
}

0 comments on commit f9ec48f

Please sign in to comment.