mirror of
https://github.com/gavvvr/obsidian-timecodes-plugin.git
synced 2026-07-22 05:38:08 +00:00
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
env:
|
|
FORCE_COLOR: 1
|
|
|
|
jobs:
|
|
Build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ghcr.io/${{ github.repository }}/ci-runner:node-24-obsidian-1.12.7-trixie-slim
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
- name: Environment details
|
|
run: pnpm dlx envinfo --system --binaries
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Build
|
|
run: pnpm run build
|
|
- name: Test
|
|
run: pnpm run test:unit
|
|
- name: E2E tests
|
|
run: pnpm install && xvfb-run pnpm run test
|
|
working-directory: e2e
|
|
- name: Upload unit-test coverage data
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: lcov-unit.info
|
|
path: out/coverage/lcov.info
|
|
- name: Upload E2E-test coverage data
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: lcov-e2e.info
|
|
path: e2e/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 unit-tests coverage data
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: lcov-unit.info
|
|
path: coverage/unit/
|
|
- name: Download E2E-tests coverage data
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: lcov-e2e.info
|
|
path: coverage/e2e/
|
|
- name: SonarQube Scan
|
|
uses: SonarSource/sonarqube-scan-action@v6
|
|
env:
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|