From 55373eadebe5e69e8832ce140032f2a71a012ee9 Mon Sep 17 00:00:00 2001 From: edouard Date: Wed, 27 Jul 2022 17:23:26 +0200 Subject: [PATCH] github ci: add gui --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bec2d57c..4c1f36a5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,3 +42,43 @@ jobs: - name: Test on Rust ${{ matrix.toolchain }} (non Windows) if: matrix.os != 'windows-latest' run: cargo test --verbose --color always -- --nocapture + + linter_gui: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt + override: true + - name: rustfmt + run: cd gui && cargo fmt -- --check + + unit_tests_gui: + needs: linter_gui + strategy: + matrix: + toolchain: + - stable + - nightly + os: + - ubuntu-latest + - macOS-latest + - windows-latest + runs-on: ${{ matrix.os }} + steps: + - name: Checkout source code + uses: actions/checkout@v2 + - name: Install Rust ${{ matrix.toolchain }} toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + override: true + profile: minimal + - name: Test on Rust ${{ matrix.toolchain }} (only Windows) + if: matrix.os == 'windows-latest' + run: cd gui && cargo test --verbose --no-default-features + - name: Test on Rust ${{ matrix.toolchain }} (non Windows) + if: matrix.os != 'windows-latest' + run: cd gui && cargo test --verbose --color always -- --nocapture