Skip to content

Commit

Permalink
feat: 增加actions测试
Browse files Browse the repository at this point in the history
  • Loading branch information
chaxus committed Dec 10, 2022
1 parent 735ff2c commit 7a15f78
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 33 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

name: pages-build-site
on:
pull_request:
branches: main
jobs:
lint:
if: github.repository == 'chaxus/ran'
timeout-minutes: 10
runs-on: ubuntu-latest
name: "Lint: node-16, ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build

- name: Test
run: pnpm run test
34 changes: 1 addition & 33 deletions .github/workflows/pages-build-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,36 +53,4 @@ jobs:
with:
github_token: ${{ secrets.RAN_ACTIONS_TOKEN }}
exclude_assets: ''
publish_dir: packages/docs/.vitepress/dist

lint:
if: github.repository == 'chaxus/ran'
timeout-minutes: 10
runs-on: ubuntu-latest
name: "Lint: node-16, ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build

- name: Test
run: pnpm run test
publish_dir: packages/docs/.vitepress/dist
19 changes: 19 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Semantic Pull Request

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
if: github.repository == 'chaxus/ran'
runs-on: ubuntu-latest
name: Semantic Pull Request
steps:
- name: Validate PR title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.RAN_ACTIONS_TOKEN }}

0 comments on commit 7a15f78

Please sign in to comment.