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

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

concurrency:
group: ci-${{ github.event_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings

jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v5
- run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: rustup toolchain install stable --component rustfmt
- run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: rustup update stable && rustup default stable
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --all-targets --locked -- -D warnings

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in all, we're installing 5 rust targets (3x test, 1x fmt, 1x clippy). Is that really needed? It certainly makes the CI slower.

Any why are we using the nightly formatter, but stable clippy?

@FineFindus FineFindus Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in all, we're installing 5 rust targets (3x test, 1x fmt, 1x clippy). Is that really needed? It certainly makes the CI slower.

It'll get faster once GitHub updates the pre-installed versions :) Alternatively we could also use the older, installed ones, at the risk of missing out of features/fixes in newer rust releases.

Any why are we using the nightly formatter, but stable clippy?

Swapped to stable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But not pushed yet? :)

Lgtm then!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops

10 changes: 5 additions & 5 deletions src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ mod test {
Channel {
id: "UC8-Th83bH_thdKZDJCrn88g".to_string(),
name: "The Tonight Show Starring Jimmy Fallon".to_string(),
avatar: "https://i1.ytimg.com/vi/hTC6Xa5TrRc/hqdefault.jpg".to_string(),
avatar: Some("https://i1.ytimg.com/vi/hTC6Xa5TrRc/hqdefault.jpg".to_string()),
verified: true,
},
&channel_rss
Expand All @@ -320,7 +320,7 @@ mod test {
Channel {
id: "UC8-Th83bH_thdKZDJCrn88g".to_string(),
name: "The Tonight Show Starring Jimmy Fallon".to_string(),
avatar: "https://i1.example.com/vi/hTC6Xa5TrRc/hqdefault.jpg".to_string(),
avatar: Some("https://i1.example.com/vi/hTC6Xa5TrRc/hqdefault.jpg".to_string()),
verified: true,
},
&channel_rss
Expand All @@ -333,7 +333,7 @@ mod test {
Channel {
id: "UC8-Th83bH_thdKZDJCrn88g".to_string(),
name: "Wrong channel name".to_string(),
avatar: "https://i1.example.com/vi/hTC6Xa5TrRc/hqdefault.jpg".to_string(),
avatar: Some("https://i1.example.com/vi/hTC6Xa5TrRc/hqdefault.jpg".to_string()),
verified: true,
},
&channel_rss
Expand All @@ -354,7 +354,7 @@ mod test {
Channel {
id: "UCjp_3PEaOau_nT_3vnqKIvg".to_string(),
name: "Junya Official Channel".to_string(),
avatar: "https://yt3.googleusercontent.com/ytc/AIdro_mFt9iiVlgxD1gBW74I1o6H8xFtOg5AwqPj2_1JKHJ4UJg=s160-c-k-c0x00ffffff-no-rj".to_string(),
avatar: Some("https://yt3.googleusercontent.com/ytc/AIdro_mFt9iiVlgxD1gBW74I1o6H8xFtOg5AwqPj2_1JKHJ4UJg=s160-c-k-c0x00ffffff-no-rj".to_string()),
verified: true,
},
&channel_rss
Expand All @@ -374,7 +374,7 @@ mod test {
uploader: Channel {
id: "UCWnQYRWgTbsLTDOAVc3uzRg".to_string(),
name: "KottiXD".to_string(),
avatar: "https://yt3.googleusercontent.com/ytc/AIdro_lBXTw2HqumabqUMrMcWlB5BVUa-bDCP1YQ0Jwf89C6RMY=s160-c-k-c0x00ffffff-no-rj".to_string(),
avatar: Some("https://yt3.googleusercontent.com/ytc/AIdro_lBXTw2HqumabqUMrMcWlB5BVUa-bDCP1YQ0Jwf89C6RMY=s160-c-k-c0x00ffffff-no-rj".to_string()),
verified: false,
},
};
Expand Down
Loading