Unverified Commit ae7c480b authored by Carlos Tadeu Panato Junior's avatar Carlos Tadeu Panato Junior Committed by Carlos Panato
Browse files

Replace Jenkins to use circleci (#813)

parent 664ce79f
version: 2.1
executors:
default:
working_directory: ~/mattermost-redux
docker:
- image: circleci/node:11.3.0
jobs:
install:
executor:
name: default
steps:
- checkout
- run: ls -la
- restore_cache:
keys:
- test-dependencies-{{ checksum "package.json" }}
- run: npm install --ignore-scripts
- run: npm run flow-typed install
- run: ls -la
- save_cache:
paths:
- node_modules
- flow-typed
key: test-dependencies-{{ checksum "package.json" }}
lint:
executor:
name: default
steps:
- checkout
- restore_cache:
keys:
- test-dependencies-{{ checksum "package.json" }}
- run: npm run check
- run: npm run flow
test:
executor:
name: default
steps:
- checkout
- restore_cache:
keys:
- test-dependencies-{{ checksum "package.json" }}
- run: npm test
- store_test_results:
path: build/
workflows:
version: 2
pr-build:
jobs:
- install
- lint:
requires:
- install
- test:
requires:
- lint
# Mattermost Redux
# Mattermost Redux ![CircleCI branch](https://img.shields.io/circleci/project/github/mattermost/mattermost-redux/master.svg)
The project purpose is consolidating the storage, web utilities and logic of the webapp and React Native mobile clients into a single driver. We encourage you to use mattermost-redux to power your own Mattermost clients or integrations.
......
#!/usr/bin/env groovy
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '2'))
timeout(time: 30, unit: 'MINUTES')
}
agent {
docker {
image 'node:8'
}
}
stages {
stage('Install') {
steps {
sh "npm install --ignore-scripts"
sh "npm run flow-typed install"
}
}
stage('Check style') {
steps {
sh "npm run check"
}
}
stage('Check types') {
steps {
sh "npm run flow"
}
}
stage('Test') {
steps {
sh 'npm test'
}
post {
always {
junit 'build/test-results.xml'
}
}
}
}
}
......@@ -71,7 +71,7 @@
"fix": "eslint --ignore-path .gitignore --ignore-pattern node_modules --quiet . --fix",
"flow": "flow",
"flow-typed": "flow-typed",
"test": "jest --forceExit --detectOpenHandles",
"test": "jest --forceExit --detectOpenHandles --maxWorkers=2",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"prepare": "npm run build"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment