Skip to content

Commit

Permalink
Merge branch 'main' into renovate/github-codeql-action-digest
Browse files Browse the repository at this point in the history
  • Loading branch information
jerusdp authored Jun 30, 2024
2 parents ca5fdec + 4e396db commit 9c783ba
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 111 deletions.
118 changes: 7 additions & 111 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
version: 2.1

setup: true

orbs:
toolkit: jerus-org/circleci-toolkit@0.4.0
toolkit: jerus-org/circleci-toolkit@0.8.3

parameters:
min-rust-version:
Expand All @@ -17,130 +19,24 @@ executors:
docker:
- image: jerusdp/ci-rust:<<pipeline.parameters.min-rust-version>>

jobs:
required-builds:
executor: rust-env
steps:
- checkout
- run: cargo --version
- toolkit/cargo_build:
rust_version: "stable"
- toolkit/cargo_build:
rust_version: "<<pipeline.parameters.min-rust-version>>"

optional-builds:
executor: rust-env
steps:
- checkout
- run: cargo --version
- toolkit/cargo_build:
rust_version: "nightly"
- toolkit/cargo_build:
rust_version: "beta"

all-features-flag-test:
executor: rust-env
steps:
- checkout
- run: cargo --version
- run:
name: Test all features of the crate
command: "cargo test --all-features"

feature-test:
parameters:
mockd-feature:
type: string
executor: rust-env
steps:
- checkout
- run: cargo --version
- run:
name: Test <<parameters.mockd-feature>> features of the crate
command: "cargo test --features <<parameters.mockd-feature>>"

docs:
executor: rust-env
environment:
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
steps:
- checkout
- run:
name: Test generation of all of the documentation for the crate
command: |
cargo +nightly doc \
--lib \
--no-deps \
--all-features \
--document-private-items
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
validation:
check_last_commit:
when:
not:
equal: [scheduled_pipeline, << pipeline.trigger_source >>]
jobs:
- required-builds
- toolkit/common_tests
- feature-test:
matrix:
parameters:
mockd-feature:
[
all,
address,
animal,
beer,
company,
contact,
currency,
datetime,
file,
generator,
hacker,
hipster,
image,
internet,
job,
language,
log-level,
name,
password,
payment,
person,
random-bool,
status-code,
unique,
user-agent,
vehicle,
words,
]
requires:
- toolkit/common_tests
- required-builds
- docs
- all-features-flag-test:
requires:
- feature-test
# - pr-changelog-update:
- toolkit/update_changelog:
requires:
- all-features-flag-test
context:
- release
ssh_fingerprint: << pipeline.parameters.fingerprint >>
- optional-builds
- docs
- optional-builds
- toolkit/check_for_bot
release:
when:
and:
- equal: [scheduled_pipeline, << pipeline.trigger_source >>]
- equal: ["release check", << pipeline.schedule.name >>]
jobs:
- toolkit/make_release:
specific_version: true
version: "v0.4.8"
context:
- release
ssh_fingerprint: << pipeline.parameters.fingerprint >>
26 changes: 26 additions & 0 deletions .circleci/success.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2.1

parameters:
min-rust-version:
type: string
default: "1.75"
fingerprint:
type: string
default: SHA256:OkxsH8Z6Iim6WDJBaII9eTT9aaO1f3eDc6IpsgYYPVg

executors:
rust-env:
docker:
- image: jerusdp/ci-rust:<<pipeline.parameters.min-rust-version>>

jobs:
show_success:
executor: rust-env
steps:
- run: |
echo "Completed successfully!"
workflows:
success:
jobs:
- show_success
134 changes: 134 additions & 0 deletions .circleci/validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
version: 2.1

orbs:
toolkit: jerus-org/[email protected]

parameters:
min-rust-version:
type: string
default: "1.61"
fingerprint:
type: string
default: SHA256:OkxsH8Z6Iim6WDJBaII9eTT9aaO1f3eDc6IpsgYYPVg

executors:
rust-env:
docker:
- image: jerusdp/ci-rust:<<pipeline.parameters.min-rust-version>>

jobs:
required-builds:
executor: rust-env
steps:
- checkout
- run: cargo --version
- toolkit/cargo_build:
rust_version: "stable"
- toolkit/cargo_build:
rust_version: "<<pipeline.parameters.min-rust-version>>"

optional-builds:
executor: rust-env
steps:
- checkout
- run: cargo --version
- toolkit/cargo_build:
rust_version: "nightly"
- toolkit/cargo_build:
rust_version: "beta"

all-features-flag-test:
executor: rust-env
steps:
- checkout
- run: cargo --version
- run:
name: Test all features of the crate
command: "cargo test --all-features"

feature-test:
parameters:
mockd-feature:
type: string
executor: rust-env
steps:
- checkout
- run: cargo --version
- run:
name: Test <<parameters.mockd-feature>> features of the crate
command: "cargo test --features <<parameters.mockd-feature>>"

docs:
executor: rust-env
environment:
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
steps:
- checkout
- run:
name: Test generation of all of the documentation for the crate
command: |
cargo +nightly doc \
--lib \
--no-deps \
--all-features \
--document-private-items
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
validation:
jobs:
- required-builds
- optional-builds
- docs
- toolkit/common_tests
- toolkit/idiomatic_rust
- feature-test:
matrix:
parameters:
mockd-feature:
[
all,
address,
animal,
beer,
company,
contact,
currency,
datetime,
file,
generator,
hacker,
hipster,
image,
internet,
job,
language,
log-level,
name,
password,
payment,
person,
random-bool,
status-code,
unique,
user-agent,
vehicle,
words,
]
requires:
- toolkit/common_tests
- required-builds
- docs
- all-features-flag-test:
requires:
- feature-test
# - pr-changelog-update:
- toolkit/update_changelog:
requires:
- all-features-flag-test
- toolkit/idiomatic_rust
context:
- release
ssh_fingerprint: << pipeline.parameters.fingerprint >>
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- chore-update jerus-org/circleci-toolkit orb version to 0.4.0(pr [#645])
- chore(pr [#645])
- ci-adopt orb v0.8.0 and setup config script for early exit on commits by bot(pr [#648])

### Security

Expand Down Expand Up @@ -373,6 +374,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#645]: https://github.com/jerus-org/mockd/pull/645
[#645]: https://github.com/jerus-org/mockd/pull/645
[#647]: https://github.com/jerus-org/mockd/pull/647
[#648]: https://github.com/jerus-org/mockd/pull/648
[Unreleased]: https://github.com/jerus-org/mockd/compare/0.4.7...HEAD
[0.4.7]: https://github.com/jerus-org/mockd/compare/0.4.6...0.4.7
[0.4.6]: https://github.com/jerus-org/mockd/compare/0.4.5...0.4.6
Expand Down

0 comments on commit 9c783ba

Please sign in to comment.