Skip to content

Commit

Permalink
add ci for example sqlx-sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
BimaAdi committed Nov 11, 2024
1 parent 1ffc72a commit 37dacc2
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/sqlx-sqlite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "sqlx-sqlite"
on:
push:
pull_request:
# Change to folder
defaults:
run:
working-directory: ./sqlx-sqlite
# Make sure CI fails on all warnings, including Clippy lints
env:
RUSTFLAGS: "-Dwarnings"
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test --workspace --all-features

# Check formatting with rustfmt
formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Ensure rustfmt is installed and setup problem matcher
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt Check
run: cargo fmt --check

clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Clippy
run: cargo clippy --all-targets --all-features --all
3 changes: 3 additions & 0 deletions sqlx-sqlite/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@

Check warning on line 1 in sqlx-sqlite/src/lib.rs

View workflow job for this annotation

GitHub Actions / cargo fmt

Diff in /home/runner/work/qorm-example/qorm-example/sqlx-sqlite/src/lib.rs



0 comments on commit 37dacc2

Please sign in to comment.