-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
275 additions
and
72 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,24 @@ | ||
name: 🚀 Feature Request | ||
description: "Suggest a feature / idea" | ||
labels: [ "enhancement" ] | ||
body: | ||
- type: checkboxes | ||
attributes: | ||
label: Check for existing issues | ||
description: Check the backlog of issues to reduce the chances of creating duplicates; if an issue already exists, place a `+1` (👍) on it. | ||
options: | ||
- label: Completed | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe the feature | ||
description: A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: | | ||
If applicable, add mockups / screenshots to help present your vision of the feature | ||
description: Drag images into the text input below | ||
validations: | ||
required: false |
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,23 @@ | ||
name: 🐜 Bug report | ||
description: "Create a bug report to help us improve" | ||
labels: [ "defect" ] | ||
body: | ||
- type: checkboxes | ||
attributes: | ||
label: Check for existing issues | ||
description: Check the backlog of issues to reduce the chances of creating duplicates; if an issue already exists, place a `+1` (👍) on it. | ||
options: | ||
- label: Completed | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe the bug / provide steps to reproduce it | ||
description: A clear and concise description of what the bug is. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: If applicable, add mockups / screenshots to help explain present your vision of the feature | ||
description: Drag issues into the text input below | ||
validations: | ||
required: false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
name: Security audit | ||
|
||
permissions: | ||
contents: read | ||
issues: write # to create issues (actions-rs/audit-check) | ||
checks: write # to create check (actions-rs/audit-check) | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "**/Cargo.toml" | ||
- "**/Cargo.lock" | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
CARGO_TERM_COLOR: always | ||
CLICOLOR: 1 | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
security_audit: | ||
runs-on: ubuntu-latest | ||
# Prevent sudden announcement of a new advisory from failing ci: | ||
continue-on-error: true | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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,137 @@ | ||
name: CI | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
CARGO_TERM_COLOR: always | ||
CLICOLOR: 1 | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ci: | ||
permissions: | ||
contents: none | ||
name: CI | ||
needs: [test, msrv, lockfile, docs, rustfmt, clippy] | ||
runs-on: ubuntu-latest | ||
if: "always()" | ||
steps: | ||
- name: Failed | ||
run: exit 1 | ||
if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')" | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: taiki-e/install-action@cargo-hack | ||
- name: Build | ||
run: cargo test --no-run | ||
- name: Test | ||
run: cargo hack test --feature-powerset | ||
msrv: | ||
name: "Check MSRV" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: taiki-e/install-action@cargo-hack | ||
- name: Default features | ||
run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --all-targets | ||
lockfile: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: "Is lockfile updated?" | ||
run: cargo update --locked | ||
docs: | ||
name: Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Check documentation | ||
env: | ||
RUSTDOCFLAGS: -D warnings | ||
run: cargo doc --all-features --no-deps --document-private-items | ||
rustfmt: | ||
name: rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
components: rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Check formatting | ||
run: cargo fmt --all -- --check --config format_code_in_doc_comments=true | ||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
actions: read | ||
security-events: write # to upload sarif results | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Install SARIF tools | ||
run: cargo install clippy-sarif --locked | ||
- name: Install SARIF tools | ||
run: cargo install sarif-fmt --locked | ||
- name: Check | ||
run: > | ||
cargo clippy --all-targets --message-format=json -- -D warnings | ||
| clippy-sarif | ||
| tee clippy-results.sarif | ||
| sarif-fmt | ||
continue-on-error: true | ||
- name: Upload | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: clippy-results.sarif | ||
wait-for-processing: true | ||
- name: Report status | ||
run: cargo clippy --all-features --all-targets -- -D warnings |
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,28 @@ | ||
# Not run as part of pre-commit checks because they don't handle sending the correct commit | ||
# range to `committed` | ||
name: Lint Commits | ||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
CARGO_TERM_COLOR: always | ||
CLICOLOR: 1 | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
committed: | ||
name: Lint Commits | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Lint Commits | ||
uses: crate-ci/committed@master |
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,25 @@ | ||
name: Spelling | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: [pull_request] | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
CARGO_TERM_COLOR: always | ||
CLICOLOR: 1 | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
spelling: | ||
name: Spell Check with Typos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
- name: Spell Check Repo | ||
uses: crate-ci/typos@master |
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,6 +1,8 @@ | ||
[package] | ||
name = "mongodb-cursor-pagination" | ||
version = "1.0.0-rc.1" | ||
rust-version = "1.78.0" | ||
|
||
authors = ["Kylian Lichtensteiger <[email protected]"] | ||
edition = "2021" | ||
license = "MIT" | ||
|