Skip to content

Commit

Permalink
Add actions for cli
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Jun 7, 2024
1 parent 5ac05e2 commit da0b87c
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test-cli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Node.js CI

on:
push:
branches: [ master ]
paths:
- kimi-cli
pull_request:
branches: [ master ]
paths:
- kimi-cli

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: false
max-parallel: 1
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: kimi-cli/package-lock.json
- run: npm i
working-directory: ./kimi-cli
- run: npm run lint
working-directory: ./kimi-cli
- run: npm run test-cov
working-directory: ./kimi-cli
env:
KIMI_API_KEY: ${{ secrets.API_KEY }}
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
directory: ./kimi-cli
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: Node.js CI
on:
push:
branches: [ master ]
paths:
- kimi
pull_request:
branches: [ master ]
paths:
- kimi

jobs:
build:
Expand Down

0 comments on commit da0b87c

Please sign in to comment.