Files
OpenBB/.github/workflows/test-unit-desktop-win64.yml
Danglewood a08d5d75d0 [BugFix] Update openssl in cargo.toml and Remove dll and dylibs From Repo (#7478)
* update openssl in cargo.toml, and remove dll and dylibs from repo

* cargo fmt

* cargo clippy

* cargo fmt again

* unused-mut

* adjust build.rs for test container

* windows runner setup

* fix masos linking

* same treatment for sbom files
2026-04-23 21:46:03 +00:00

116 lines
3.3 KiB
YAML
Vendored

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@v6
- name: Cache vcpkg
uses: actions/cache@v5
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 --vcpkg-root ${{ env.VCPKG_ROOT }}
env:
VCPKG_DEFAULT_TRIPLET: x64-windows
- name: Set OpenSSL env
shell: bash
run: |
echo "OPENSSL_DIR=${{ env.VCPKG_ROOT }}/installed/x64-windows" >> $GITHUB_ENV
echo "OPENSSL_INCLUDE_DIR=${{ env.VCPKG_ROOT }}/installed/x64-windows/include" >> $GITHUB_ENV
echo "OPENSSL_LIB_DIR=${{ env.VCPKG_ROOT }}/installed/x64-windows/lib" >> $GITHUB_ENV
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: lts/*
- name: Set up Rust
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
with:
toolchain: stable
profile: minimal
components: clippy, rustfmt
override: true
- name: Cache cargo registry
uses: actions/cache@v5
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@v5
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@v5
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