Merge pull request #17 from fenollp/ci

setup ci
This commit is contained in:
setzer22 2022-03-25 11:41:35 +01:00 committed by GitHub
commit 8408503866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 1 deletions

51
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,51 @@
on: [push]
name: CI
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- run: sudo apt install libxcb-composite0-dev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: actions/checkout@v2
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- run: rustup component add rustfmt
- uses: actions/checkout@v2
- run: sudo apt install libxcb-composite0-dev
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- run: rustup component add clippy
- run: sudo apt install libxcb-composite0-dev
- uses: actions/checkout@v2
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets --all-features -- -D warnings -W clippy::all

View File

@ -88,7 +88,7 @@ mod tests {
);
assert_eq!(
color_to_hex(Color32::from_rgba_premultiplied(226, 226, 226, 119)),
"e2e2e277".to_string()
"#e2e2e277".to_string()
);
}
}