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
61 changes: 61 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
pull_request:
push:

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
lint:
name: Format & Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev libsqlite3-dev

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

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

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

- name: Clippy
run: cargo clippy --workspace --all-targets --locked

test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev libsqlite3-dev

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

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

- name: Build workspace
run: cargo build --workspace --locked

- name: Run tests
run: cargo test --workspace --locked
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,21 @@ impl MigrationTrait for Migration {
.alter_table(
Table::alter()
.table(ServerPrefs::Table)
.add_column_if_not_exists(ColumnDef::new(ServerPrefs::VotdChapter).big_integer().null())
.add_column_if_not_exists(
ColumnDef::new(ServerPrefs::VotdChapter)
.big_integer()
.null(),
)
.to_owned(),
)
.await?;
manager
.alter_table(
Table::alter()
.table(ServerPrefs::Table)
.add_column_if_not_exists(ColumnDef::new(ServerPrefs::VotdVerse).big_integer().null())
.add_column_if_not_exists(
ColumnDef::new(ServerPrefs::VotdVerse).big_integer().null(),
)
.to_owned(),
)
.await
Expand Down
7 changes: 2 additions & 5 deletions crates/sb-discord-bot/src/poise_impl/helpers.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
use serenity::all::{Colour, CreateEmbed};
use poise::CreateReply;
use serenity::all::{Colour, CreateEmbed};

use crate::{
poise_impl::types::{Context, Error},
store::{
contract::BibleBooks,
valid_cache::get_chapter_count,
},
store::{contract::BibleBooks, valid_cache::get_chapter_count},
util::prefs::{calc_lang, calc_translation},
};

Expand Down
Loading
Loading