-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,62 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
test-ruby: | ||
docker: | ||
- image: drivy/rails-ci:0.1.2 | ||
- image: cimg/ruby:2.6.6 | ||
steps: | ||
- checkout | ||
|
||
- run: git fetch origin --depth=1000 | ||
|
||
# Install CodeClimate test reporter binary, rebuild without cache to update the binary | ||
- restore_cache: | ||
key: cc_test_reporter | ||
- run: | ||
name: Install Code Climate test reporter | ||
name: Install CMake, pkg-config and system dependencies | ||
command: sudo apt update && sudo apt install cmake pkg-config libsqlite3-dev | ||
- run: | ||
name: Install Bundler | ||
command: | | ||
[ -f bin/cc-test-reporter ] || curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./bin/cc-test-reporter | ||
chmod +x bin/cc-test-reporter | ||
- restore_cache: | ||
key: cc_test_reporter | ||
paths: | ||
- bin/cc-test-reporter | ||
|
||
sudo gem update --system | ||
gem install bundler --no-document | ||
- run: | ||
name: "Creating a Gemfile.lock without bundler's version" | ||
command: "head -n -3 Gemfile.lock > Gemfile.lock.no-version" | ||
|
||
# Bundle install with cache, Ignore bundler version | ||
- restore_cache: | ||
key: checker_jobs-{{ checksum "Gemfile.lock.no-version"}} | ||
- run: | ||
name: Install Ruby dependencies | ||
command: bundle install --path vendor/bundle --jobs=`nproc` | ||
- save_cache: | ||
key: checker_jobs-{{ checksum "Gemfile.lock.no-version"}} | ||
paths: | ||
- vendor/bundle | ||
|
||
name: Install dependencies (bundler) | ||
command: | | ||
bundle config set frozen 'true' | ||
bundle config set path 'vendor/bundle' | ||
bundle install --jobs=4 | ||
- run: | ||
name: RSpec | ||
name: Install linting dependencies (Bundler) | ||
command: | | ||
./bin/cc-test-reporter before-build | ||
bundle exec rspec --format documentation | ||
./bin/cc-test-reporter after-build --exit-code $? | ||
bundle config set frozen 'true' | ||
bundle config set path 'vendor/bundle' | ||
bundle install --jobs=4 | ||
- run: | ||
name: Lint Ruby sources (RSpec) | ||
command: bundle exec rspec | ||
|
||
lint-ruby: | ||
docker: | ||
- image: cimg/ruby:2.6.6 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install CMake, pkg-config and system dependencies | ||
command: sudo apt update && sudo apt install cmake pkg-config libsqlite3-dev | ||
- run: | ||
name: Install Bundler | ||
command: | | ||
sudo gem update --system | ||
gem install bundler --no-document | ||
- run: | ||
name: Install dependencies (bundler) | ||
command: | | ||
bundle config set frozen 'true' | ||
bundle config set path 'vendor/bundle' | ||
bundle install --jobs=4 | ||
- run: | ||
name: Pronto | ||
command: bin/pronto-ci | ||
name: Lint Ruby sources (Rubocop) | ||
command: bundle exec rubocop | ||
|
||
workflows: | ||
version: 2 | ||
test-and-deploy: | ||
jobs: | ||
- test-ruby: | ||
context: default | ||
- lint-ruby: | ||
context: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
/tmp/ | ||
.*.swp | ||
*.gem | ||
vendor/bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.6.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters