Skip to content

Merge pull request #803 from jellyfin/renovate/vitest #638

Merge pull request #803 from jellyfin/renovate/vitest

Merge pull request #803 from jellyfin/renovate/vitest #638

Workflow file for this run

name: Test
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches: [ master ]
pull_request_target:
branches: [ master ]
jobs:
vitest:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
check-latest: true
cache: npm
- name: Install Node.js dependencies
run: npm ci --no-audit
- name: Run Vitest
run: npx vitest --coverage --exclude **/integration.test.ts
- name: SonarCloud scan
if: ${{ github.repository == 'jellyfin/jellyfin-sdk-typescript' }}
uses: SonarSource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 # v3.1.0
env:
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.pullrequest.provider=github
-Dsonar.pullrequest.github.repository=${{ github.repository }}
-Dsonar.pullrequest.github.token.secured=${{ secrets.GITHUB_TOKEN }}
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}