CI - Use CircleCI 2.0 (#658)

This commit is contained in:
dkhamsing 2018-08-26 14:12:10 -07:00 committed by GitHub
parent b3c1aa429e
commit eb3fe479d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 17 deletions

44
.circleci/config.yml Normal file
View File

@ -0,0 +1,44 @@
version: 2
jobs:
build:
working_directory: ~/dkhamsing/open-source-ios-apps
parallelism: 1
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
docker:
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
command: /sbin/init
steps:
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- run:
working_directory: ~/dkhamsing/open-source-ios-apps
command: rm -f dkhamsing/open-source-ios-apps/.rvmrc; echo 2.4.0 > dkhamsing/open-source-ios-apps/.ruby-version; rvm use 2.4.0 --default
- restore_cache:
keys:
- v1-dep-{{ .Branch }}-
- v1-dep-master-
- v1-dep-
- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
paths:
- vendor/bundle
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- run: sudo pip install json-spec
- run: json validate --schema-file=.github/schema.json --document-file=contents.json
- run: ruby .github/osia_validate_categories.rb
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results

View File

@ -1,17 +0,0 @@
machine:
ruby:
version: 2.2.0
test:
pre:
- sudo pip install json-spec
override:
- json validate --schema-file=.github/schema.json --document-file=contents.json
- ruby .github/osia_validate_categories.rb
deployment:
master:
branch: master
commands:
- ruby .github/osia_convert.rb
- ./.github/deploy.sh
- gem install delete_my_tweets
- ruby .github/osia_tweet_clean.rb