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
65 changes: 65 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Run clippy

on:
push:
branches: ["*"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up cache
uses: actions/cache@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.rustup/toolchains/
target/
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}

# - name: Install WASM toolchain
# run: rustup target add wasm32-unknown-unknown

- name: Check project
run: cargo clippy --workspace --all-targets --all-features -- -D warnings

# - name: Check project (WASM)
# # Note lack of --all-targets here because tests and examples are not wasm compatible
# run: cargo clippy --workspace --all-features --target wasm32-unknown-unknown -- -D warnings

test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up cache
uses: actions/cache@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.rustup/toolchains/
target/
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}

- name: Check project
run: RUST_BACKTRACE=1 cargo test --workspace --all-targets --all-features
14 changes: 14 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
[toolchain]
channel = "1.88.0"
components = [
"rustc",
"cargo",
"rustfmt",
"rust-std",
"rust-docs",
"rust-analyzer",
"clippy",
# "miri",
"rust-src",
# "rust-mingw",
# "llvm-tools",
# "rustc-dev",
]
1 change: 1 addition & 0 deletions src/api/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ struct Error {
}

#[tokio::test]
#[ignore]
async fn deserialisation() -> Result<()> {
let _posts: Vec<GlowficResponse<Post>> = serde_json::from_str(&read_to_string(ALL_POSTS)?)?;
let _posts: Vec<Post> = serde_json::from_str(&read_to_string(OK_POSTS)?)?;
Expand Down