-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implemented health check endpoint
- Loading branch information
1 parent
3d183ab
commit e9fd52a
Showing
8 changed files
with
2,000 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,124 @@ | ||
version: 2 | ||
jobs: | ||
build-and-test: | ||
docker: | ||
- image: cimg/rust:1.74 | ||
environment: | ||
# Fail the build if there are warnings | ||
RUSTFLAGS: '-D warnings' | ||
steps: | ||
- checkout | ||
- run: | ||
name: Version information | ||
command: rustc --version; cargo --version; rustup --version | ||
# If you have committed your Cargo.lock file to version control | ||
# delete this step. | ||
- run: | ||
name: Calculate dependencies | ||
command: cargo generate-lockfile | ||
- restore_cache: | ||
keys: | ||
- v1-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} | ||
- run: | ||
name: Build all targets | ||
command: cargo build | ||
- save_cache: | ||
paths: | ||
- /home/circleci/.cargo/registry | ||
- target/debug/.fingerprint | ||
- target/debug/build | ||
- target/debug/deps | ||
key: v1-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} | ||
- run: | ||
name: Run all tests | ||
command: cargo test | ||
|
||
security: | ||
docker: | ||
- image: cimg/rust:1.74 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Version information | ||
command: rustc --version; cargo --version; rustup --version | ||
- run: | ||
name: Cache permission | ||
command: | | ||
sudo chown -R $(whoami):$(id -ng) /home/circleci/.cargo/bin/cargo | ||
- restore_cache: | ||
keys: | ||
- v1-cargo-audit-{{ arch }} | ||
- run: | ||
name: Install dependency auditing tool | ||
command: cargo install cargo-audit | ||
- save_cache: | ||
paths: | ||
- /home/circleci/.cargo/bin/cargo | ||
key: v1-cargo-audit-{{ arch }} | ||
- run: | ||
name: Check for known security issues in dependencies | ||
command: cargo audit | ||
|
||
format: | ||
docker: | ||
- image: cimg/rust:1.74 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Version information | ||
command: rustc --version; cargo --version; rustup --version | ||
- run: | ||
name: Install formatter | ||
command: rustup component add rustfmt | ||
- run: | ||
name: Formatting | ||
command: cargo fmt --all -- --check | ||
|
||
lint: | ||
docker: | ||
- image: cimg/rust:1.74 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Version information | ||
command: rustc --version; cargo --version; rustup --version | ||
- run: | ||
name: Install Clippy | ||
command: rustup component add clippy | ||
- run: | ||
name: Linting | ||
command: cargo clippy -- -D warnings | ||
|
||
coverage: | ||
machine: true | ||
steps: | ||
- checkout | ||
- run: | ||
name: Coverage with docker | ||
command: docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin cargo tarpaulin --ignore-tests | ||
|
||
workflows: | ||
version: 2 | ||
build-test: | ||
jobs: | ||
- build-and-test: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- security: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- format: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- lint: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- coverage: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
|
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 +1,3 @@ | ||
/target | ||
*.profraw | ||
.raw.rs |
Oops, something went wrong.