Skip to content

feat(CI&CD): ✨ cI #16

feat(CI&CD): ✨ cI

feat(CI&CD): ✨ cI #16

Workflow file for this run

name: 🧪 Test
on:
push:
branches:
- "**"
- "!main"
- "!master"
pull_request:
branches:
- "**"
- "!main"
- "!master"
defaults:
run:
shell: bash
jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
test:
name: Test
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Test
run: pnpm run test
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
base: main
title: "Pull Request form Actions By ${{ github.ref }}"
body: "This is a pull request created by Actions"
commit-message: "Pull Request main into ${{ github.ref }}"
labels: "CI"
assignees: "guozichun"