-
Notifications
You must be signed in to change notification settings - Fork 28
/
circleci_advanced.yml
55 lines (53 loc) · 1.37 KB
/
circleci_advanced.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Advanced CircleCI workflow config with file sharing
# and separate jobs for tests and running coverage checks.
version: 2
jobs:
test:
docker:
- image: circleci/ruby:2.5-browsers
steps:
- checkout
- run:
name: Install dependencies
command: |
sudo apt-get install cmake
bundle install
- run:
name: Run RSpec
command: |
mkdir -p /tmp/coverage
bundle exec rspec
- run:
name: Store coverage report
command: mv coverage/lcov/project.lcov /tmp/coverage/
- persist_to_workspace:
root: /tmp/coverage
paths: .
- store_artifacts:
path: /tmp/coverage
destination: coverage
analyse_coverage:
docker:
- image: circleci/ruby:2.5-browsers
steps:
- checkout
- attach_workspace:
at: /tmp/coverage # gives access to project's LCOV report
- run:
name: Check coverage
command: |
sudo apt-get install cmake
gem install undercover
undercover --lcov /tmp/coverage/project.lcov \
--compare origin/master
workflows:
version: 2
build_and_test:
jobs:
- test
- analyse_coverage:
requires:
- test
filters:
branches:
ignore: master