v0.27.4 #6437
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| Tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| submodules: recursive | |
| # Github runner ocasionally runs out of space causing flakiness | |
| - name: Free disk space | |
| uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be | |
| with: | |
| tool-cache: false | |
| large-packages: false | |
| docker-images: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 | |
| with: | |
| node-version: 24 | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 | |
| with: | |
| key: "test" | |
| - name: Install build deps | |
| run: | | |
| sudo apt-get install openssh-client expect | |
| cargo install --locked just@1.4.0 | |
| # Pin cargo-llvm-cov to 0.6.15 because versions 0.6.16+ depend on ruzstd 0.8.x which uses | |
| # the unstable `unsigned_is_multiple_of` feature not available in nightly-2025-01-01 | |
| cargo install --locked cargo-llvm-cov@0.6.15 | |
| cargo clean | |
| rustup component add llvm-tools-preview | |
| - name: Build UI | |
| run: | | |
| just npm ci | |
| just openapi | |
| just npm run openapi:tests-sdk | |
| just npm run build | |
| # Built separately (own lockfile) so the workspace coverage build embeds it | |
| # and warpgate-protocol-rdp's extraction test runs. | |
| - name: Run Rust unit tests | |
| run: cargo llvm-cov test --workspace | |
| - name: Build images | |
| working-directory: tests | |
| run: | | |
| make all | |
| - name: Install deps | |
| working-directory: tests | |
| run: | | |
| sudo apt update | |
| sudo apt install -y gnome-keyring kubectl | |
| # FreeRDP CLI (xfreerdp/xfreerdp3) drives the native RDP tests. The `-x11` | |
| # build needs an X display, so xvfb provides a virtual one on headless CI. | |
| sudo apt install -y xvfb | |
| sudo apt install -y freerdp2-x11 || sudo apt install -y freerdp3-x11 | |
| pip3 install keyring==24 poetry==1.8.3 | |
| poetry install | |
| - name: Run | |
| working-directory: tests | |
| run: | | |
| TIMEOUT=120 poetry run ./run.sh | |
| cargo llvm-cov report --lcov > coverage.lcov | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@2848b2cda0e5190984587ec6bb1f36730ca78d50 | |
| with: | |
| name: coverage.lcov | |
| path: tests/coverage.lcov | |
| - name: Upload coverage (HTML) | |
| uses: actions/upload-artifact@2848b2cda0e5190984587ec6bb1f36730ca78d50 | |
| with: | |
| name: coverage-html | |
| path: target/llvm-cov/html | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f | |
| if: ${{ env.SONAR_TOKEN }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |