mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
Add circleci config, run linter
This commit is contained in:
parent
00063e13d8
commit
975c74e305
1 changed files with 94 additions and 0 deletions
94
.circleci/config.yml
Normal file
94
.circleci/config.yml
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
# Javascript Node CircleCI 2.0 configuration file
|
||||||
|
#
|
||||||
|
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
|
||||||
|
#
|
||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
docker:
|
||||||
|
- image: circleci/openjdk:8-jdk-browsers
|
||||||
|
environment:
|
||||||
|
# lang settings required for Meteor's Mongo
|
||||||
|
LANG: C.UTF-8
|
||||||
|
LANGUAGE: C.UTF-8
|
||||||
|
LC_ALL: C.UTF-8
|
||||||
|
LC_NUMERIC: en_US.UTF-8
|
||||||
|
METEOR_BIN_TMP_DIR: /home/circleci/build-temp/
|
||||||
|
METEOR_BIN_TMP_FILE: meteor-bin-temp
|
||||||
|
|
||||||
|
working_directory: ~/app
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore_cache:
|
||||||
|
key: build-temp-{{ checksum ".meteor/release" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
|
- restore_cache:
|
||||||
|
key: meteor-release-{{ checksum ".meteor/release" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
|
- restore_cache:
|
||||||
|
key: meteor-packages-{{ checksum ".meteor/versions" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
|
- restore_cache:
|
||||||
|
key: npm-packages-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
|
- run:
|
||||||
|
name: install build essentials
|
||||||
|
command: sudo apt-get install -y build-essential
|
||||||
|
- run:
|
||||||
|
name: restore cached meteor bin
|
||||||
|
command: |
|
||||||
|
if [ -e ~/build-temp/meteor-bin ]
|
||||||
|
then
|
||||||
|
echo "Cached Meteor bin found, restoring it"
|
||||||
|
sudo cp ~/build-temp/meteor-bin /usr/local/bin/meteor
|
||||||
|
else
|
||||||
|
echo "No cached Meteor bin found."
|
||||||
|
fi
|
||||||
|
- run:
|
||||||
|
name: install Meteor
|
||||||
|
command: |
|
||||||
|
# only install meteor if bin isn't found
|
||||||
|
command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com | /bin/sh
|
||||||
|
- run:
|
||||||
|
name: check versions
|
||||||
|
command: |
|
||||||
|
echo "Meteor version:"
|
||||||
|
meteor --version
|
||||||
|
which meteor
|
||||||
|
echo "Meteor node version:"
|
||||||
|
meteor node -v
|
||||||
|
echo "Meteor npm version:"
|
||||||
|
meteor npm -v
|
||||||
|
echo "Java version:"
|
||||||
|
java -version
|
||||||
|
- run:
|
||||||
|
name: install yarn
|
||||||
|
command: meteor npm i -g yarn
|
||||||
|
- run:
|
||||||
|
name: install npm packages
|
||||||
|
command: meteor yarn
|
||||||
|
- run:
|
||||||
|
name: code linting
|
||||||
|
command: meteor yarn lint
|
||||||
|
- run:
|
||||||
|
name: copy meteor bin to build cache
|
||||||
|
command: |
|
||||||
|
mkdir -p ~/build-temp
|
||||||
|
cp /usr/local/bin/meteor ~/build-temp/meteor-bin
|
||||||
|
- save_cache:
|
||||||
|
key: build-temp-{{ checksum ".meteor/release" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
|
paths:
|
||||||
|
- ~/build-temp
|
||||||
|
- save_cache:
|
||||||
|
key: meteor-release-{{ checksum ".meteor/release" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
|
paths:
|
||||||
|
- ~/.meteor
|
||||||
|
- save_cache:
|
||||||
|
key: meteor-packages-{{ checksum ".meteor/versions" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
|
paths:
|
||||||
|
- .meteor/
|
||||||
|
- save_cache:
|
||||||
|
key: npm-packages-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
|
paths:
|
||||||
|
- ./node_modules/
|
||||||
|
- ~/.npm/
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue