Skip to content

Commit

Permalink
add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mahendraHegde committed Mar 27, 2024
1 parent 39d65d7 commit d9f0f5d
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"plugins": ["unused-imports"],
"rules": {
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/ci-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI Pipeline

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8.15.4
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: pnpm install --frozen-lockfile --strict-peer-dependencies
- run: node -v
- run: pnpm -v
- run: pnpm lint
- run: pnpm prettier
- run: pnpm typecheck
- run: pnpm test:e2e
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"test": "pnpm --filter @node-idempotency/* test",
"test:e2e": "pnpm --filter @node-idempotency/* test:e2e",
"lint": "eslint packages/**/*.ts",
"prettier": "prettier -c .",
"lint:fix": "eslint packages/**/*.ts --fix",
"format": "prettier --write .",
"build": "pnpm --filter @node-idempotency/* build",
Expand Down

0 comments on commit d9f0f5d

Please sign in to comment.