Skip to content

Commit

Permalink
chore: adjust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Apr 25, 2021
1 parent 10d1570 commit 024830b
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 35 deletions.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

labels:
- bug
---

**Describe the bug**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

labels:
- feature
---

**Is your feature request related to a problem? Please describe.**
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Docs

on:
push:
branches:
- develop
paths:
- docs/**

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore Cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install
run: yarn
- name: Build
run: yarn docs build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: docs/.vuepress/dist
publish_branch: master
external_repository: koishijs/koishijs.github.io
force_orphan: true
58 changes: 31 additions & 27 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: CI
name: Test

on:
- push
- pull_request
push:
paths-ignore:
- docs/**
pull_request:
paths-ignore:
- docs/**

env:
CI: true
Expand All @@ -14,27 +18,27 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Check out
uses: actions/checkout@v1
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Create .npmrc
run: 'echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > .npmrc'
- name: Install
run: yarn
- name: Build
run: yarn build:ci
- name: Lint
run: yarn lint
- name: Unit Test
run: yarn test:json
- name: Report Coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/coverage-final.json
name: codecov
- name: Publish
run: npx ts-node build/publish
- name: Check out
uses: actions/checkout@v1
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Create .npmrc
run: 'echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > .npmrc'
- name: Install
run: yarn
- name: Build
run: yarn build:ci
- name: Lint
run: yarn lint
- name: Unit Test
run: yarn test:json
- name: Report Coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/coverage-final.json
name: codecov
- name: Publish
run: npx ts-node build/publish
4 changes: 2 additions & 2 deletions packages/plugin-eval/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Domain, Context, Command, Argv } from 'koishi-core'
import { Context, Command, Argv } from 'koishi-core'
import { segment, Logger, defineProperty, noop } from 'koishi-utils'
import { EvalWorker, Trap, EvalConfig, Config } from './main'
import { resolve } from 'path'
Expand Down Expand Up @@ -37,7 +37,7 @@ declare module 'koishi-core' {
}
}

interface OptionManifest extends Domain.OptionConfig {
interface OptionManifest extends Argv.OptionConfig {
name: string
desc: string
}
Expand Down

0 comments on commit 024830b

Please sign in to comment.