Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Clippy configuration file
msrv = "1.75.0"

# Allow certain lints that might be too pedantic for this project
allow-expect-in-tests = true
allow-unwrap-in-tests = true

# Disallow certain patterns
disallowed-methods = [
"std::collections::HashMap::new", # prefer FxHashMap for performance
"std::collections::HashSet::new", # prefer FxHashSet for performance
]

# Set limits
too-many-arguments-threshold = 7
type-complexity-threshold = 250
trivial-copy-size-limit = 64

# Documentation
missing-docs-in-crate-items = true
89 changes: 89 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Bug Report
description: Report a bug or unexpected behavior
title: "[Bug]: "
labels: ["bug"]

body:
- type: markdown
attributes:
value: |
Thank you for reporting a bug! Please fill out this template to help us resolve the issue.

- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of what the bug is.
placeholder: Describe the bug...
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Create a RedisMq instance with...
2. Send a message with...
3. Observe error...
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What you expected to happen
placeholder: I expected...
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened
placeholder: Instead, what happened was...
validations:
required: true

- type: textarea
id: code
attributes:
label: Code Sample
description: If applicable, add a minimal code sample that reproduces the issue
render: rust
placeholder: |
use apalis_rsmq::RedisMq;

#[tokio::main]
async fn main() {
// Your code here
}

- type: textarea
id: environment
attributes:
label: Environment
description: Please provide information about your environment
placeholder: |
- OS: [e.g. Ubuntu 22.04]
- Rust version: [e.g. 1.75.0]
- apalis-rsmq version: [e.g. 0.1.0-alpha.1]
- Redis version: [e.g. 7.0]
validations:
required: true

- type: textarea
id: logs
attributes:
label: Logs/Error Messages
description: If applicable, add relevant log output or error messages
render: text

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context about the problem here
64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Feature Request
description: Suggest a new feature or enhancement
title: "[Feature]: "
labels: ["enhancement"]

body:
- type: markdown
attributes:
value: |
Thank you for suggesting a new feature! Please fill out this template to help us understand your request.

- type: textarea
id: problem
attributes:
label: Problem Statement
description: Is your feature request related to a problem? Please describe.
placeholder: I'm always frustrated when...
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like to see
placeholder: I would like to see...
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe any alternative solutions or features you've considered
placeholder: I've also considered...

- type: textarea
id: use_case
attributes:
label: Use Case
description: Describe your use case and how this feature would help
placeholder: This feature would help me...
validations:
required: true

- type: textarea
id: implementation
attributes:
label: Implementation Ideas
description: If you have ideas about how this could be implemented, please share
placeholder: This could be implemented by...

- type: checkboxes
id: contribution
attributes:
label: Contribution
options:
- label: I would be willing to implement this feature

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context, screenshots, or examples about the feature request
57 changes: 57 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## Description

Brief description of the changes in this PR.

## Type of Change

Please check the relevant option:

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring
- [ ] Other (please describe):

## Changes Made

- List the specific changes made
- Include any new files added
- Mention any files deleted or moved

## Testing

- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have added integration tests where appropriate

## Documentation

- [ ] I have updated the documentation accordingly
- [ ] I have updated the CHANGELOG.md file
- [ ] I have added docstring comments to new public functions/methods

## Checklist

- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My changes generate no new warnings
- [ ] I have run `cargo fmt` to format my code
- [ ] I have run `cargo clippy` and resolved any issues
- [ ] Any dependent changes have been merged and published

## Breaking Changes

If this PR contains breaking changes, please describe them here and provide migration instructions.

## Additional Notes

Any additional information that reviewers should know about this PR.

## Related Issues

Fixes #(issue number)
Closes #(issue number)
Related to #(issue number)
63 changes: 63 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Benchmarks

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
benchmark:
name: Run Benchmarks
runs-on: ubuntu-latest

services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Install cargo-criterion
run: cargo install cargo-criterion

- name: Run benchmarks
run: cargo criterion --message-format=json > benchmark-results.json
env:
REDIS_URL: redis://localhost:6379

- name: Store benchmark results
uses: benchmark-action/github-action-benchmark@v1
if: github.ref == 'refs/heads/main'
with:
tool: 'cargo'
output-file-path: benchmark-results.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
comment-on-alert: true
alert-threshold: '150%'
fail-on-alert: false

- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: benchmark-results.json
Loading
Loading