Skip to content

Composable Components #581

Composable Components

Composable Components #581

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
types:
- opened
- synchronize
workflow_dispatch:
jobs:
build:
name: Build, lint and test
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout repo
uses: actions/checkout@v6
- name: 📦 Setup pnpm
uses: pnpm/action-setup@v4
- name: ⚒️ Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: 📦 Install Dependencies
run: npm run bootstrap
- name: 🚦 Lint
run: pnpm run lint
- name: 🔨 Build
run: pnpm run --filter react-compare-slider build
- name: 👷 Build Example Project
run: pnpm run --filter @this/example build
- name: 🎭 Install Playwright
run: pnpx playwright install --with-deps
- name: 🧪 Test
run: pnpm run test:ci
- name: 🧊 SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v7
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=nerdyman
-Dsonar.projectKey=nerdyman_react-compare-slider
-Dsonar.sources=lib
-Dsonar.inclusions=**/*.js,**/*.jsx,**/*.ts,**/*.tsx,**/*.yml,**/*.yaml
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
- name: 🤏 Compressed Size Action
uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
install-script: "pnpm install --frozen-lockfile --filter react-compare-slider"
build-script: "build"
cwd: lib