mirror of
https://github.com/gavvvr/obsidian-timecodes-plugin.git
synced 2026-07-22 05:38:08 +00:00
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
Build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ghcr.io/${{ github.repository }}/ci-runner:node-22-trixie-slim
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
- name: Environment details
|
|
run: pnpm version
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Build
|
|
run: pnpm run build
|
|
- name: Test
|
|
run: pnpm run test:unit
|
|
- name: Upload coverage data
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: lcov.info
|
|
path: out/coverage/lcov.info
|
|
|
|
SonarScan:
|
|
needs: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
|
- name: Download coverage data
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: lcov.info
|
|
path: coverage/
|
|
- name: SonarQube Scan
|
|
uses: SonarSource/sonarqube-scan-action@v6
|
|
env:
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|