Skip to content

chore(deps): bump postcss from 8.5.16 to 8.5.26 (#33) #80

chore(deps): bump postcss from 8.5.16 to 8.5.26 (#33)

chore(deps): bump postcss from 8.5.16 to 8.5.26 (#33) #80

Workflow file for this run

name: TypeScript/Node.js CI
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Detect package manager
id: detect
run: |
if [ -f "pnpm-lock.yaml" ]; then
echo "pm=pnpm" >> $GITHUB_OUTPUT
elif [ -f "yarn.lock" ]; then
echo "pm=yarn" >> $GITHUB_OUTPUT
elif [ -f "package-lock.json" ] || [ -f "package.json" ]; then
echo "pm=npm" >> $GITHUB_OUTPUT
else
echo "pm=none" >> $GITHUB_OUTPUT
fi
- name: Install pnpm
if: steps.detect.outputs.pm == 'pnpm'
run: npm install -g pnpm
- name: Install dependencies
if: steps.detect.outputs.pm != 'none'
run: |
if [ "${{ steps.detect.outputs.pm }}" == "pnpm" ]; then
pnpm install || true
elif [ "${{ steps.detect.outputs.pm }}" == "yarn" ]; then
yarn install || true
else
npm install || true
fi
- name: Lint with ESLint
continue-on-error: true
if: steps.detect.outputs.pm != 'none'
run: |
if [ "${{ steps.detect.outputs.pm }}" == "pnpm" ]; then
pnpm run lint || echo "::warning::ESLint found issues"
elif [ "${{ steps.detect.outputs.pm }}" == "yarn" ]; then
yarn lint || echo "::warning::ESLint found issues"
else
npm run lint || echo "::warning::ESLint found issues"
fi
- name: Type check with tsc
continue-on-error: true
if: steps.detect.outputs.pm != 'none' && hashFiles('tsconfig.json') != ''
run: |
if [ -f "tsconfig.json" ]; then
npx tsc --noEmit || echo "::warning::TypeScript found type errors"
else
echo "::notice::No tsconfig.json found, skipping type checking"
fi
- name: Run tests
if: steps.detect.outputs.pm != 'none'
run: |
if [ "${{ steps.detect.outputs.pm }}" == "pnpm" ]; then
pnpm test -- --coverage || echo "::notice::No tests configured"
elif [ "${{ steps.detect.outputs.pm }}" == "yarn" ]; then
yarn test --coverage || echo "::notice::No tests configured"
else
npm test -- --coverage || echo "::notice::No tests configured"
fi
- name: Upload coverage to Codecov
if: success() && hashFiles('coverage/lcov.info') != ''
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
files: ./coverage/lcov.info
fail_ci_if_error: false
flags: unittests
name: codecov-${{ matrix.node-version }}
- name: Build
if: steps.detect.outputs.pm != 'none'
run: |
if [ "${{ steps.detect.outputs.pm }}" == "pnpm" ]; then
pnpm run build || echo "::notice::No build script configured"
elif [ "${{ steps.detect.outputs.pm }}" == "yarn" ]; then
yarn build || echo "::notice::No build script configured"
else
npm run build || echo "::notice::No build script configured"
fi