Skip to content

Merge pull request #4 from RoboC00p/feat/init-project #26

Merge pull request #4 from RoboC00p/feat/init-project

Merge pull request #4 from RoboC00p/feat/init-project #26

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
types: [opened, synchronize, reopened]
jobs:
check:
name: Lint, format, typecheck, build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '20'
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Lint
run: pnpm exec eslint . --max-warnings 0
- name: Format check
run: pnpm run format:check
- name: Typecheck
run: pnpm run typecheck
- name: Test
run: pnpm test
- name: Build
run: pnpm run build
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
needs: check
if: github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.base_ref == 'main')
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '20'
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Test with coverage
run: pnpm run test:coverage
- name: SonarCloud scan
uses: SonarSource/sonarqube-scan-action@2f77a1ec69fb1d595b06f35ab27e97605bdef703 # v5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}