Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Add validate CLI pipeline #373

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/validate-cli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Validate Cli

on:
push:
branches:
- '!develop'
- '!main'
paths:
[
'apps/cli/**',
'.github/workflows/validate-cli.yml',
'.github/workflows/deploy-cli.yml'
]
pull_request:
paths:
[
'apps/cli/**',
'.github/workflows/deploy-cli.yml',
'.github/workflows/validate-cli.yml'
]

jobs:
validate:
runs-on: ubuntu-latest
name: Validate Cli

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.2.0
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
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 packages
run: |
pnpm i

- name: Lint
run: |
pnpm run lint:cli
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"lint:api": "turbo run lint --filter=api",
"lint:web": "turbo run lint --filter=web",
"lint:platform": "turbo run lint --filter=platform",
"lint:cli": "turbo run lint --filter=cli",
"lint:api-client": "pnpm run --filter=api-client lint",
"build": "turbo run build",
"build:api": "pnpm db:generate-types && turbo run build --filter=api",
Expand Down