---
name: CI Build
on:
push:
branches:
- "**"
paths-ignore:
- "**/*.md"
- "LICENSE"
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
env:
RUSTFLAGS: "--deny warnings"
jobs:
format:
name: Rust Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Rust Toolchain setup
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Format Check
uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
build:
name: CI Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Toolchain setup
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
- name: Build
run: cargo build
- name: Build example log_echo
run: cargo run --example log_echo
- name: Build example log_to_discord_script
run: cargo run --example log_to_discord_script
- name: Build example log_to_discord_url
run: cargo build --example log_to_discord_url
- name: Build example log_with_fern
run: cargo build --example log_with_fern
test:
name: CI Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Toolchain setup
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
- name: Test Features
run: cargo test --all-features
- name: Test Without Features
run: cargo test --no-default-features