From 9043273c0f0aa2292e3b57e072a92184f3435ee2 Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Wed, 23 Mar 2022 01:08:48 +0100 Subject: [PATCH 1/4] setup ci Signed-off-by: Pierre Fenoll --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fe24186 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +on: [push] + +name: CI + +jobs: + build_and_test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Install + run: sudo apt install libxcb-composite0-dev + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - uses: actions/checkout@v2 + + - uses: actions-rs/cargo@v1 + with: + command: test From 6718cd81d5a9380fca64d2e66ccc0e8d557a3f35 Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Wed, 23 Mar 2022 01:14:41 +0100 Subject: [PATCH 2/4] fix tests Signed-off-by: Pierre Fenoll --- egui_node_graph/src/color_hex_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egui_node_graph/src/color_hex_utils.rs b/egui_node_graph/src/color_hex_utils.rs index e846f0a..0479a8c 100644 --- a/egui_node_graph/src/color_hex_utils.rs +++ b/egui_node_graph/src/color_hex_utils.rs @@ -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() ); } } From 4f40a7053bc18ff2e782a4462ebcdfaef2edaa03 Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Wed, 23 Mar 2022 01:19:38 +0100 Subject: [PATCH 3/4] also fmt clippy check Signed-off-by: Pierre Fenoll --- .github/workflows/ci.yml | 62 +++++++++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe24186..4bf1925 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,19 +3,67 @@ on: [push] name: CI jobs: - build_and_test: - name: Test + test: + name: cargo test runs-on: ubuntu-latest steps: - - name: Install - run: sudo apt install libxcb-composite0-dev - + - 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 + + check: + name: cargo check + runs-on: ubuntu-latest + steps: + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - run: sudo apt install libxcb-composite0-dev + - uses: actions/checkout@v2 + - uses: actions-rs/cargo@v1 + with: + command: check + - uses: actions-rs/cargo@v1 + with: + command: check + args: --all-features From aa89d6de4ab29d7de35413644f28fe1571751bf6 Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Fri, 25 Mar 2022 02:23:58 +0100 Subject: [PATCH 4/4] drop check, clippy does it Signed-off-by: Pierre Fenoll --- .github/workflows/ci.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bf1925..cc80afc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,21 +49,3 @@ jobs: with: command: clippy args: --workspace --all-targets --all-features -- -D warnings -W clippy::all - - check: - name: cargo check - runs-on: ubuntu-latest - steps: - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - - run: sudo apt install libxcb-composite0-dev - - uses: actions/checkout@v2 - - uses: actions-rs/cargo@v1 - with: - command: check - - uses: actions-rs/cargo@v1 - with: - command: check - args: --all-features