From 488c5b1c8850df42abda30fbcbb804f3e9694434 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Fri, 17 Oct 2025 08:47:03 -0700 Subject: [PATCH] try testing for windows ARM --- .../workflows/test-unit-desktop-winARM.yml | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 .github/workflows/test-unit-desktop-winARM.yml diff --git a/.github/workflows/test-unit-desktop-winARM.yml b/.github/workflows/test-unit-desktop-winARM.yml new file mode 100644 index 00000000000..09508804004 --- /dev/null +++ b/.github/workflows/test-unit-desktop-winARM.yml @@ -0,0 +1,115 @@ +name: Test Windows x64 + +on: + pull_request: + branches: + - develop + paths: + - 'desktop/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +jobs: + test-windows-x64: + runs-on: windows-latest + permissions: + contents: read + defaults: + run: + working-directory: desktop + env: + VCPKG_ROOT: ${{ github.workspace }}/vcpkg + steps: + - uses: actions/checkout@v4 + + - name: Cache vcpkg + uses: actions/cache@v4 + with: + path: ${{ env.VCPKG_ROOT }} + key: ${{ runner.os }}-vcpkg-${{ hashFiles('desktop/**/vcpkg.json') }} + restore-keys: | + ${{ runner.os }}-vcpkg- + + - name: Bootstrap vcpkg + working-directory: ${{ github.workspace }} + run: | + if (-not (Test-Path ${{ env.VCPKG_ROOT }})) { + git clone https://github.com/microsoft/vcpkg.git ${{ env.VCPKG_ROOT }} + } + ${{ env.VCPKG_ROOT }}/bootstrap-vcpkg.bat + shell: pwsh + + - name: Install OpenSSL using vcpkg + working-directory: ${{ github.workspace }} + run: ${{ env.VCPKG_ROOT }}/vcpkg install openssl:x64-windows-static --vcpkg-root ${{ env.VCPKG_ROOT }} + env: + VCPKG_DEFAULT_TRIPLET: x64-windows-static + + - name: Set OpenSSL env + shell: bash + run: | + echo "OPENSSL_DIR=${{ env.VCPKG_ROOT }}/installed/x64-windows-static" >> $GITHUB_ENV + echo "OPENSSL_INCLUDE_DIR=${{ env.VCPKG_ROOT }}/installed/x64-windows-static/include" >> $GITHUB_ENV + echo "OPENSSL_LIB_DIR=${{ env.VCPKG_ROOT }}/installed/x64-windows-static/lib" >> $GITHUB_ENV + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + components: clippy, rustfmt + override: true + + - name: Cache cargo registry + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: windows-x64-cargo-registry-${{ hashFiles('desktop/**/Cargo.lock') }} + restore-keys: | + windows-x64-cargo-registry- + + - name: Cache cargo build + uses: actions/cache@v4 + with: + path: desktop/target + key: windows-x64-cargo-build-${{ hashFiles('desktop/**/Cargo.lock') }} + restore-keys: | + windows-x64-cargo-build- + + - name: Check formatting + run: cargo fmt --all -- --check + + - name: Run clippy linter + run: cargo clippy --all-targets --all-features -- -D warnings + + - name: Run tests + run: cargo test --all + + - name: Cache node_modules + uses: actions/cache@v4 + with: + path: desktop/node_modules + key: windows-x64-node-modules-${{ hashFiles('desktop/**/package-lock.json') }} + restore-keys: | + windows-x64-node-modules- + + - name: Install frontend dependencies + run: npm ci + + - name: Lint frontend code + run: npm run lint + + - name: Type check + run: ./node_modules/.bin/tsc --noEmit + + - name: Run frontend tests + run: npm run test -- --watch=false