Skip to content

Commit fd35b16

Browse files
authored
Merge pull request #5 from apalis-dev/develop
chore: introduce a working version of apalis-pgmq
2 parents 8fc3137 + 9ac6185 commit fd35b16

30 files changed

Lines changed: 5914 additions & 17 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @geofmureithi
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Bug Report
2+
description: File a bug report to help us improve
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
assignees: []
6+
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to fill out this bug report!
12+
13+
- type: textarea
14+
id: what-happened
15+
attributes:
16+
label: What happened?
17+
description: A clear and concise description of what the bug is.
18+
placeholder: Tell us what you see!
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: expected
24+
attributes:
25+
label: Expected behavior
26+
description: A clear and concise description of what you expected to happen.
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: reproduce
32+
attributes:
33+
label: Steps to reproduce
34+
description: Steps to reproduce the behavior
35+
placeholder: |
36+
1. Setup with '....'
37+
2. Do '....'
38+
3. See error
39+
validations:
40+
required: true
41+
42+
- type: textarea
43+
id: code
44+
attributes:
45+
label: Minimal code example
46+
description: If applicable, add a minimal code example that reproduces the issue
47+
render: rust
48+
49+
- type: dropdown
50+
id: version
51+
attributes:
52+
label: Version
53+
description: What version are you running?
54+
options:
55+
- 0.7.x
56+
- 1.0.0-alpha.x
57+
- 1.0.0-beta.x
58+
- 1.0.0-rc.x
59+
- main branch
60+
- Other (specify in additional context)
61+
validations:
62+
required: true
63+
64+
- type: textarea
65+
id: environment
66+
attributes:
67+
label: Environment
68+
description: |
69+
Please provide information about your environment:
70+
- OS: [e.g. Ubuntu 20.04, macOS 12.0, Windows 11]
71+
- Rust version: [e.g. 1.70.0]
72+
- Cargo version: [e.g. 1.70.0]
73+
value: |
74+
- OS:
75+
- Rust version:
76+
- Cargo version:
77+
validations:
78+
required: true
79+
80+
- type: textarea
81+
id: logs
82+
attributes:
83+
label: Relevant log output
84+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
85+
render: shell
86+
87+
- type: textarea
88+
id: context
89+
attributes:
90+
label: Additional context
91+
description: Add any other context about the problem here.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Feature Request
2+
description: Suggest an idea for this project
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
assignees: []
6+
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to suggest a new feature!
12+
13+
- type: textarea
14+
id: problem
15+
attributes:
16+
label: Is your feature request related to a problem?
17+
description: A clear and concise description of what the problem is.
18+
placeholder: I'm always frustrated when...
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: solution
24+
attributes:
25+
label: Describe the solution you'd like
26+
description: A clear and concise description of what you want to happen.
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: alternatives
32+
attributes:
33+
label: Describe alternatives you've considered
34+
description: A clear and concise description of any alternative solutions or features you've considered.
35+
36+
- type: textarea
37+
id: use-case
38+
attributes:
39+
label: Use case
40+
description: Describe your specific use case and how this feature would help.
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: implementation
46+
attributes:
47+
label: Additional context
48+
description: Add any other context, screenshots, or implementation ideas about the feature request here.
49+
50+
- type: checkboxes
51+
id: terms
52+
attributes:
53+
label: Code of Conduct
54+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/apalis-dev/apalis/blob/main/CODE_OF_CONDUCT.md)
55+
options:
56+
- label: I agree to follow this project's Code of Conduct
57+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Description
2+
3+
Brief description of what this PR does.
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix (non-breaking change which fixes an issue)
8+
- [ ] New feature (non-breaking change which adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
- [ ] Performance improvement
12+
- [ ] Refactoring (no functional changes)
13+
14+
## Testing
15+
16+
- [ ] I have added tests that prove my fix is effective or that my feature works
17+
- [ ] I have run the existing tests and they pass
18+
- [ ] I have run `cargo fmt` and `cargo clippy`
19+
20+
## Checklist
21+
22+
- [ ] My code follows the code style of this project
23+
- [ ] I have performed a self-review of my own code
24+
- [ ] I have commented my code, particularly in hard-to-understand areas
25+
- [ ] I have made corresponding changes to the documentation
26+
- [ ] My changes generate no new warnings
27+
- [ ] I have added tests that prove my fix is effective or that my feature works
28+
- [ ] New and existing unit tests pass locally with my changes
29+
30+
## Additional Notes
31+
32+
Any additional information, context, or screenshots about the pull request here.

.github/dependabot.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for Cargo
4+
- package-ecosystem: "cargo"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "06:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "geofmureithi"
13+
assignees:
14+
- "geofmureithi"
15+
commit-message:
16+
prefix: "deps"
17+
include: "scope"
18+
labels:
19+
- "dependencies"
20+
- "rust"
21+
22+
# Enable version updates for GitHub Actions
23+
- package-ecosystem: "github-actions"
24+
directory: "/"
25+
schedule:
26+
interval: "weekly"
27+
day: "monday"
28+
time: "06:00"
29+
open-pull-requests-limit: 5
30+
reviewers:
31+
- "geofmureithi"
32+
assignees:
33+
- "geofmureithi"
34+
commit-message:
35+
prefix: "ci"
36+
include: "scope"
37+
labels:
38+
- "dependencies"
39+
- "github-actions"

.github/workflows/changelog.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Changelog"
2+
permissions:
3+
contents: read
4+
on:
5+
pull_request:
6+
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
# Enforces the update of a changelog file on every pull request
11+
changelog:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: dangoslen/changelog-enforcer@v3

.github/workflows/ci.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
workflow_call:
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
DATABASE_URL: postgres://postgres:postgres@localhost/postgres
13+
SQLX_OFFLINE: true
14+
15+
jobs:
16+
test:
17+
name: Test Suite
18+
runs-on: ${{ matrix.os }}
19+
services:
20+
postgres:
21+
image: ghcr.io/pgmq/pg18-pgmq:v1.7.0
22+
env:
23+
POSTGRES_PASSWORD: postgres
24+
ports:
25+
- 5432:5432
26+
options: >-
27+
--health-cmd="pg_isready -U postgres"
28+
--health-interval=10s
29+
--health-timeout=5s
30+
--health-retries=5
31+
strategy:
32+
matrix:
33+
os: [ubuntu-latest]
34+
rust: [stable, beta]
35+
include:
36+
- os: ubuntu-latest
37+
rust: nightly
38+
steps:
39+
- name: Checkout sources
40+
uses: actions/checkout@v6
41+
42+
- name: Install Rust toolchain
43+
uses: dtolnay/rust-toolchain@master
44+
with:
45+
toolchain: ${{ matrix.rust }}
46+
47+
- name: Cache cargo registry
48+
uses: actions/cache@v5
49+
with:
50+
path: |
51+
~/.cargo/registry
52+
~/.cargo/git
53+
target
54+
key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
55+
restore-keys: |
56+
${{ runner.os }}-cargo-${{ matrix.rust }}-
57+
${{ runner.os }}-cargo-
58+
59+
- name: Run cargo test with all features
60+
run: cargo test --all-features --verbose -- --test-threads=1
61+
62+
fmt:
63+
name: Rustfmt
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Checkout sources
67+
uses: actions/checkout@v6
68+
69+
- name: Install Rust toolchain
70+
uses: dtolnay/rust-toolchain@stable
71+
with:
72+
components: rustfmt
73+
74+
- name: Run cargo fmt
75+
run: cargo fmt --all -- --check
76+
77+
clippy:
78+
name: Clippy
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Checkout sources
82+
uses: actions/checkout@v6
83+
84+
- name: Install Rust toolchain
85+
uses: dtolnay/rust-toolchain@stable
86+
with:
87+
components: clippy
88+
89+
- name: Cache cargo registry
90+
uses: actions/cache@v5
91+
with:
92+
path: |
93+
~/.cargo/registry
94+
~/.cargo/git
95+
target
96+
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
97+
98+
- name: Run cargo clippy
99+
run: cargo clippy --all-targets --all-features
100+
101+
docs:
102+
name: Documentation
103+
runs-on: ubuntu-latest
104+
steps:
105+
- name: Checkout sources
106+
uses: actions/checkout@v6
107+
108+
- name: Install Rust toolchain
109+
uses: dtolnay/rust-toolchain@nightly
110+
111+
- name: Cache cargo registry
112+
uses: actions/cache@v5
113+
with:
114+
path: |
115+
~/.cargo/registry
116+
~/.cargo/git
117+
target
118+
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }}
119+
120+
- name: Build documentation
121+
run: cargo doc --all-features --no-deps --document-private-items
122+
env:
123+
RUSTDOCFLAGS: "-Dwarnings"
124+
125+
unused-deps:
126+
name: Unused Dependencies
127+
runs-on: ubuntu-latest
128+
steps:
129+
- name: Checkout sources
130+
uses: actions/checkout@v6
131+
132+
- name: Install Rust nightly toolchain
133+
uses: dtolnay/rust-toolchain@nightly
134+
135+
- name: Install cargo-udeps
136+
uses: taiki-e/install-action@cargo-udeps
137+
138+
- name: Check for unused dependencies
139+
run: cargo +nightly udeps --all-targets --all-features

.github/workflows/issues.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Issue assignment
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
auto-assign:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
steps:
13+
- name: "Auto-assign issue"
14+
uses: pozil/auto-assign-issue@v2
15+
with:
16+
assignees: geofmureithi
17+
numOfAssignee: 1
18+
allowSelfAssign: true

0 commit comments

Comments
 (0)