Skip to content

feat: add debug and environment params #258

feat: add debug and environment params

feat: add debug and environment params #258

Workflow file for this run

name: Run Checks
on:
pull_request:
types:
- opened
- synchronize
jobs:
build:
name: Build Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Verify pnpm Installation
run: pnpm --version
- name: Cache pnpm store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Dependencies
run: pnpm install --frozen-lockfile
env:
NPM_CONFIG_USERCONFIG: .npmrc.ci
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create a .remote-config.js file
run: |
touch packages/sdk/.remote-config.js && echo "echo \"module.exports = { remoteConfig: { apiUrl: 'https://api.superviz.com', conferenceLayerUrl: 'https://video-frame.superviz.com/lab/index.html'}};\" > .remote-config.js" | bash -
touch packages/realtime/.remote-config.js && echo "echo \"module.exports = { remoteConfig: { apiUrl: 'https://api.superviz.com' }};\" > .remote-config.js" | bash -
- name: Run Build
run: pnpm run build
test:
name: Run Tests
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
package: [realtime, sdk, yjs, 'room']
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- uses: actions/checkout@v4
- name: Install Dependencies
run: pnpm install --frozen-lockfile
env:
NPM_CONFIG_USERCONFIG: .npmrc.ci
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create a .remote-config.js file
run: |
touch packages/sdk/.remote-config.js && echo "echo \"module.exports = { remoteConfig: { apiUrl: 'https://api.superviz.com', conferenceLayerUrl: 'https://video-frame.superviz.com/lab/index.html'}};\" > .remote-config.js" | bash -
touch packages/realtime/.remote-config.js && echo "echo \"module.exports = { remoteConfig: { apiUrl: 'https://api.superviz.com' }};\" > .remote-config.js" | bash -
- name: Run Unit Tests
run: pnpm run test:unit:ci --filter=@superviz/${{ matrix.package }}
- name: Post PR Comment
run: npx github-actions-ctrf packages/${{ matrix.package }}/ctrf/ctrf-report.json --pr-comment --title=${{ matrix.package }}
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test-web-components:
name: Run Test Web Components
runs-on: ubuntu-latest
needs: build
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- uses: actions/checkout@v4
- name: Install Dependencies
run: pnpm install --frozen-lockfile
env:
NPM_CONFIG_USERCONFIG: .npmrc.ci
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create a .remote-config.js file
run: |
touch packages/sdk/.remote-config.js && echo "echo \"module.exports = { remoteConfig: { apiUrl: 'https://api.superviz.com', conferenceLayerUrl: 'https://video-frame.superviz.com/lab/index.html'}};\" > .remote-config.js" | bash -
touch packages/realtime/.remote-config.js && echo "echo \"module.exports = { remoteConfig: { apiUrl: 'https://api.superviz.com' }};\" > .remote-config.js" | bash -
- name: Install Playwright browsers
run: pnpm --filter=@superviz/sdk exec playwright install --with-deps
- name: Run tests
run: pnpm run test:unit:web-components:coverage --filter=@superviz/sdk
- name: Post PR Comment - Test web Components
uses: kefasjw/lcov-pull-request-report@v1
continue-on-error: true
with:
lcov-file: packages/sdk/coverage-components/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-title: SDK Web Components Test Coverage Report
artifact-name: sdk-web-components-coverage-report
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}