Skip to content

Commit b4685bc

Browse files
committed
Break out different test sections as separate jobs
1 parent a877657 commit b4685bc

File tree

1 file changed

+72
-6
lines changed

1 file changed

+72
-6
lines changed

.circleci/config.yml

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ version: 2.1
33
orbs:
44
snyk: snyk/[email protected]
55

6+
defaults: &defaults
7+
docker:
8+
- image: circleci/ruby:2.6-node-browsers
9+
610
jobs:
7-
build:
8-
docker:
9-
- image: circleci/ruby:2.6-node-browsers
11+
install:
12+
<<: *defaults
1013
steps:
1114
- checkout
1215
- restore_cache:
@@ -39,14 +42,77 @@ jobs:
3942
key: npm-cache-{{ checksum "package-lock.json" }}
4043
paths:
4144
- node_modules
45+
security:
46+
<<: *defaults
47+
steps:
4248
- snyk/scan:
4349
organization: uswds
50+
test-ruby:
51+
<<: *defaults
52+
steps:
53+
- run:
54+
name: Run RSpec
55+
command: bundle exec rspec
56+
lint:
57+
<<: *defaults
58+
steps:
59+
- run:
60+
name: Run lint
61+
command: npm run lint
62+
build:
63+
<<: *defaults
64+
steps:
65+
- checkout
66+
- attach_workspace:
67+
at: .
68+
- run:
69+
name: Build site and serve detached
70+
command: npm run start-detached
71+
proof:
72+
<<: *defaults
73+
steps:
74+
- checkout
75+
- attach_workspace:
76+
at: .
77+
- run:
78+
name: Proof site
79+
command: npm run proof
80+
a11y-mobile:
81+
<<: *defaults
82+
steps:
83+
- checkout
84+
- attach_workspace:
85+
at: .
86+
- run:
87+
name: Run pa11y mobile
88+
command: npm run pa11y-ci:sitemap-mobile
89+
a11y-desktop:
90+
<<: *defaults
91+
steps:
92+
- checkout
93+
- attach_workspace:
94+
at: .
4495
- run:
45-
name: Run test
46-
command: npm run test:ci
96+
name: Run pa11y desktop
97+
command: npm run pa11y-ci:sitemap
4798

4899
workflows:
49100
version: 2.1
50101
circle-uswds-site:
51102
jobs:
52-
- build
103+
- security
104+
- test-ruby
105+
- lint
106+
- install
107+
- build:
108+
requires:
109+
- install
110+
- proof:
111+
requires:
112+
- build
113+
- a11y-mobile:
114+
requires:
115+
- build
116+
- a11y-desktop:
117+
requires:
118+
- build

0 commit comments

Comments
 (0)