Skip to content

fix(gateway): preserve per-resource visibility on gateway refresh (#3… #2796

fix(gateway): preserve per-resource visibility on gateway refresh (#3…

fix(gateway): preserve per-resource visibility on gateway refresh (#3… #2796

Workflow file for this run

# ===============================================================
# 🧪 JavaScript Unit Tests (Vitest)
# ===============================================================
# Authors: Gabriel Costa, Mihai Criveti
# - runs Vitest unit tests for browser-side JavaScript
# - uses jsdom environment to test non-modular browser scripts
# - installs dependencies from package.json / package-lock.json
# ---------------------------------------------------------------
name: JavaScript Tests (Vitest)
on:
push:
branches: ["main"]
paths:
- "mcpgateway/static/**"
- "tests/**"
- "package.json"
- "package-lock.json"
- ".github/workflows/vitest.yml"
pull_request:
types: [opened, synchronize, ready_for_review]
branches: ["main"]
paths:
- "mcpgateway/static/**"
- "tests/**"
- "package.json"
- "package-lock.json"
- ".github/workflows/vitest.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
vitest:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
name: vitest
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
# -----------------------------------------------------------
# 0️⃣ Checkout
# -----------------------------------------------------------
- name: ⬇️ Checkout source
uses: actions/checkout@v5
with:
fetch-depth: 1
# -----------------------------------------------------------
# 1️⃣ Node.js Setup
# -----------------------------------------------------------
- name: 📦 Set up Node.js
uses: actions/setup-node@v5
with:
node-version: '20'
cache: npm
# -----------------------------------------------------------
# 2️⃣ Install Dependencies
# -----------------------------------------------------------
- name: 📥 Install dependencies
run: npm ci
# -----------------------------------------------------------
# 3️⃣ Run Vitest
# -----------------------------------------------------------
- name: 🧪 Run Vitest
run: npx vitest run