Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @geofmureithi
14 changes: 8 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ body:
label: Steps to reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
1. Setup with '....'
2. Do '....'
3. See error
validations:
required: true

Expand All @@ -51,9 +50,12 @@ body:
id: version
attributes:
label: Version
description: What version of apalis-sqlite are you running?
description: What version are you running?
options:
- 1.0.0-alpha.1
- 0.7.x
- 1.0.0-alpha.x
- 1.0.0-beta.x
- 1.0.0-rc.x
- main branch
- Other (specify in additional context)
validations:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/apalis-dev/apalis-sqlite/blob/main/CODE_OF_CONDUCT.md)
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)
options:
- label: I agree to follow this project's Code of Conduct
required: true
14 changes: 14 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Changelog"
permissions:
contents: read
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
branches: [ main, develop ]

jobs:
# Enforces the update of a changelog file on every pull request
changelog:
runs-on: ubuntu-latest
steps:
- uses: dangoslen/changelog-enforcer@v3
68 changes: 25 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ name: CI

on:
push:
branches: [main]
branches: [main, develop]
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
DATABASE_URL: sqlite://./test.db
SQLX_OFFLINE: true

jobs:
test:
name: Test Suite
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest] # TODO: windows-latest
os: [ubuntu-latest]
rust: [stable, beta]
include:
- os: ubuntu-latest
Expand All @@ -42,6 +44,18 @@ jobs:
${{ runner.os }}-cargo-${{ matrix.rust }}-
${{ runner.os }}-cargo-

- name: Install cargo-binstall
uses: cargo-bins/[email protected]

- name: Install sqlx-cli
run: cargo binstall sqlx-cli --locked --force

- name: Set up database
run: sqlx database create

- name: Run migrations
run: sqlx migrate run

- name: Run cargo test with all features
run: cargo test --all-features --verbose -- --test-threads=1

Expand Down Expand Up @@ -108,50 +122,18 @@ jobs:
env:
RUSTDOCFLAGS: "-Dwarnings"

security:
name: Security Audit
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v6

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

- name: Install cargo-audit
run: cargo install cargo-audit

- name: Run cargo audit
run: cargo audit

coverage:
name: Code Coverage
unused-deps:
name: Unused Dependencies
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout sources
uses: actions/checkout@v6

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

- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust nightly toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Generate code coverage
run: cargo tarpaulin --all-features --verbose --workspace --timeout 120 --out xml
- name: Install cargo-udeps
uses: taiki-e/install-action@cargo-udeps

- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:
file: cobertura.xml
fail_ci_if_error: false
- name: Check for unused dependencies
run: cargo +nightly udeps --all-targets --all-features
58 changes: 58 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Coverage

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

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
DATABASE_URL: sqlite://./test.db
SQLX_OFFLINE: true

jobs:
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v6

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

- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}

- name: Install cargo-binstall
uses: cargo-bins/[email protected]

- name: Install sqlx-cli
run: cargo binstall sqlx-cli --locked --force

- name: Set up database
run: sqlx database create

- name: Run migrations
run: sqlx migrate run

- name: Generate code coverage
run: cargo tarpaulin --all-features --verbose --workspace --timeout 120 --out xml -- --test-threads=1

- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:
file: cobertura.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
36 changes: 0 additions & 36 deletions .github/workflows/docs.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Issue assignment

on:
issues:
types: [opened]

jobs:
auto-assign:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: "Auto-assign issue"
uses: pozil/auto-assign-issue@v2
with:
assignees: geofmureithi
numOfAssignee: 1
allowSelfAssign: true
53 changes: 3 additions & 50 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ env:
CARGO_TERM_COLOR: always

jobs:
test:
uses: ./.github/workflows/ci.yaml
validate:
name: Validate Release
runs-on: ubuntu-latest
Expand Down Expand Up @@ -55,22 +57,10 @@ jobs:
exit 1
fi

- name: Run tests
run: cargo test --all-features

- name: Check format
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --all-features

- name: Build docs
run: cargo doc --all-features --no-deps

publish:
name: Publish to crates.io
runs-on: ubuntu-latest
needs: validate
needs: [test, validate]
environment: release
steps:
- name: Checkout sources
Expand All @@ -93,40 +83,3 @@ jobs:

- name: Publish to crates.io
run: cargo publish

github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [validate, publish]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout sources
uses: actions/checkout@v6

- name: Generate changelog
id: changelog
run: |
if [[ -f CHANGELOG.md ]]; then
# Extract changelog for this version
VERSION="v${{ needs.validate.outputs.version }}"
sed -n "/^## \[$VERSION\]/,/^## \[/p" CHANGELOG.md | sed '$d' > release_notes.md
if [[ -s release_notes.md ]]; then
echo "Found changelog entry for $VERSION"
else
echo "## Changes" > release_notes.md
echo "See commit history for detailed changes." >> release_notes.md
fi
else
echo "## Changes" > release_notes.md
echo "See commit history for detailed changes." >> release_notes.md
fi

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: Release v${{ needs.validate.outputs.version }}
body_path: release_notes.md
draft: false
prerelease: ${{ contains(needs.validate.outputs.version, 'alpha') || contains(needs.validate.outputs.version, 'beta') || contains(needs.validate.outputs.version, 'rc') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 0 additions & 45 deletions .github/workflows/rust-security.yml

This file was deleted.

Loading
Loading