From 45fb5c32b1d74de996087d299f5c4fcbf91ea200 Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Mon, 1 Dec 2025 01:14:44 -0800 Subject: [PATCH] chore: various test related changes (#2069) * fix: backend tests breaking with permision * test: cleanup running tests * chore: config.d.ts --- .github/workflows/test.yml | 71 +------------------------------------ src/backend/src/config.d.ts | 15 ++++++++ 2 files changed, 16 insertions(+), 70 deletions(-) create mode 100644 src/backend/src/config.d.ts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c2988d19..a9240e9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: npm run test:backend api-test: - name: backend (node env, api-test) + name: API tests (node env, api-test) runs-on: ubuntu-latest timeout-minutes: 5 @@ -59,75 +59,6 @@ jobs: path: /tmp/backend.log retention-days: 3 - playwright-test: - if: false - name: puterjs (browser env, playwright) - runs-on: ubuntu-latest - timeout-minutes: 10 - - strategy: - matrix: - node-version: [22.x] - - steps: - - uses: actions/checkout@v4 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - name: Install Dependencies - run: npm install - working-directory: ./tests/playwright - - - name: Install Playwright Browsers - run: npx playwright install --with-deps - working-directory: ./tests/playwright - - - name: Playwright Test - run: | - pip install -r ./tests/ci/requirements.txt - ./tests/ci/playwright-test.py - - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: (playwright) server-logs - path: | - /tmp/backend.log - /tmp/fs-tree-manager.log - retention-days: 3 - - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: (playwright) config-files - path: | - ./volatile/config/config.json - ./src/fs_tree_manager/config.yaml - ./tests/client-config.yaml - retention-days: 3 - - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - id: playwright-report - with: - name: (playwright) playwright-report - path: tests/playwright/playwright-report/ - retention-days: 3 - - - name: Get Playwright artifact URL - run: | - ARTIFACT_URL=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts \ - --jq '.artifacts[] | select(.name=="playwright-report") | .archive_download_url') - echo "url=$ARTIFACT_URL" >> $GITHUB_OUTPUT - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Output artifact URL - run: echo 'Artifact URL is ${{ steps.playwright-report.outputs.artifact-url }}' - vitest: name: puterjs (node env, vitest) runs-on: ubuntu-latest diff --git a/src/backend/src/config.d.ts b/src/backend/src/config.d.ts new file mode 100644 index 00000000..d2ba4c6c --- /dev/null +++ b/src/backend/src/config.d.ts @@ -0,0 +1,15 @@ +import { RecursiveRecord } from "./services/MeteringService/types"; + +type ConfigRecord = RecursiveRecord; + +export interface IConfig extends ConfigRecord { + load_config: (o: ConfigRecord) => void; + __set_config_object__: ( + object: ConfigRecord, + options?: { replacePrototype?: boolean; useInitialPrototype?: boolean } + ) => void; +} + +declare const config: IConfig; + +export = config;