Skip to content

Commit 9015045

Browse files
authored
Add Rubocop to CircleCI build
2 parents 3b00117 + baa04a5 commit 9015045

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

.circleci/config.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
11
version: 2.1 # Use 2.1 to enable using orbs and other features.
22

33
# Declare the orbs that we'll use in our config.
4-
# read more about orbs: https://circleci.com/docs/2.0/using-orbs/
54
orbs:
65
ruby: circleci/[email protected]
76

87
jobs:
9-
build: # our first job, named "build"
8+
rubocop:
9+
parallelism: 1
1010
docker:
11-
- image: cimg/ruby:2.7-node # use a tailored CircleCI docker image.
11+
- image: cimg/ruby:2.7-node
1212
steps:
13-
- checkout # pull down our git code.
14-
- ruby/install-deps # use the ruby orb to install dependencies
15-
16-
test: # our next job, called "test"
17-
# we can run "parallel job containers" to enable speeding up our tests;
18-
# this splits our tests across multiple containers.
13+
- checkout
14+
- ruby/install-deps
15+
- run:
16+
name: Run Rubocop
17+
command: bundle exec rubocop
18+
test:
1919
parallelism: 1
2020
docker:
21-
- image: cimg/ruby:2.7-node # this is our primary docker image, where step commands run.
22-
# A series of steps to run, some are similar to those in "build".
21+
- image: cimg/ruby:2.7-node
2322
steps:
2423
- checkout
2524
- ruby/install-deps
2625
- run:
2726
name: Run tests
2827
command: bundle exec rspec -fd
2928

30-
# We use workflows to orchestrate the jobs that we declared above.
3129
workflows:
3230
version: 2
33-
build_and_test: # The name of our workflow is "build_and_test"
34-
jobs: # The list of jobs we run as part of this workflow.
35-
- build # Run build first.
36-
- test: # Then run test,
37-
requires: # Test requires that build passes for it to run.
38-
- build # Finally, run the build job.
31+
checks:
32+
jobs:
33+
- rubocop
34+
- test

0 commit comments

Comments
 (0)