Skip to content

feat: add LinidApiErrorResponseBody interface for standardized error responses #167

feat: add LinidApiErrorResponseBody interface for standardized error responses

feat: add LinidApiErrorResponseBody interface for standardized error responses #167

Workflow file for this run

name: Pull request
on:
pull_request:
types: [opened, synchronize, reopened]
env:
NODE_VERSION: 22.19
PNPM_VERSION: 10.25.0
jobs:
delete-comments:
name: Delete bot comment(s)
runs-on: ubuntu-latest
steps:
- uses: izhangzhihao/delete-comment@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
delete_user_name: github-actions[bot]
issue_number: ${{ github.event.number }}
branch-naming-rules:
name: Check branch name
runs-on: ubuntu-latest
steps:
- uses: deepakputhraya/action-branch-name@master
with:
regex: '^(feature|bugfix|improvement|release|hotfix)\/[a-z0-9_.-]+$'
allowed_prefixes: 'feature,bugfix,improvement,release,hotfix'
ignore: main
min_length: 5
max_length: 50
build:
name: Setup app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
- name: Build application
run: pnpm build
commit-checks:
name: Check commit messages
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
- name: Install commitlint
run: pnpm add -D @commitlint/config-conventional @commitlint/cli
- name: Run commitlint
run: |
echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.cjs
pnpm exec commitlint --from=origin/main --to=HEAD --verbose
check-dependencies:
name: Check dependencies
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
- name: Check outdated dependencies
run: |
pnpm add -D npm-check-updates
echo '```bash' > dependencies.txt
npx ncu >> dependencies.txt
echo '```' >> dependencies.txt
- name: Comment PR
uses: JoseThen/comment-pr@v1.2.0
with:
file_path: ./dependencies.txt
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
check-style:
name: Code style
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
- name: Check style
run: pnpm validate
security-check:
name: Supply Chain Malware Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gensecaihq/Shai-Hulud-2.0-Detector@v1
with:
fail-on-critical: true
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
- name: Run unit tests
run: |
set -o pipefail
echo '```bash' > coverage.txt
pnpm test:ci | sed 's/\x1b\[[0-9;]*m//g' >> coverage.txt
echo '```' >> coverage.txt
- name: Comment PR
uses: JoseThen/comment-pr@v1.2.0
with:
file_path: ./coverage.txt
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}