Skip to content

Commit 5ba057e

Browse files
authored
ci: Separate CI steps (#57)
The contract tests require a secondary set of dependencies in order to spin up the required webserver. As a result, the required minimum rustc version might change independently of changes to our library. Similarly, generating a code coverage report requires a unique set of crates as well. To help with this, building the core library, generating coverage reports, and running the contract tests have been moved into separate CI jobs.
1 parent 7e49f8d commit 5ba057e

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.circleci/config.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,34 @@ jobs:
1414
- run:
1515
name: Check consistent formatting
1616
command: cargo fmt && git diff --exit-code
17-
- run: cargo build
18-
- run: cargo test --all-features
19-
- run: cargo doc --no-deps
20-
- run: cargo clippy --all-features -- -D warnings
17+
- run: cargo build -p eventsource-client
18+
- run: cargo test --all-features -p eventsource-client
19+
- run: cargo doc --no-deps -p eventsource-client
20+
- run: cargo clippy --all-features -p eventsource-client -- -D warnings
2121
- store_artifacts:
2222
path: target/doc
2323
destination: doc
24+
25+
generate-coverage:
26+
docker:
27+
- image: cimg/rust:1.68.0
28+
steps:
29+
- checkout
30+
- run: cargo build
2431
- run:
2532
name: Gather Coverage
2633
command: ./coverage.sh --html
2734
- store_artifacts:
2835
name: Upload Coverage
2936
path: target/llvm-cov/html
3037
destination: coverage
38+
39+
contract-tests:
40+
docker:
41+
- image: cimg/rust:1.68.0
42+
steps:
43+
- checkout
44+
- run: cargo build
3145
- run:
3246
command: make start-contract-test-service
3347
background: true
@@ -40,3 +54,5 @@ workflows:
4054
build:
4155
jobs:
4256
- build
57+
- contract-tests
58+
- generate-coverage

0 commit comments

Comments
 (0)