fix pwsh path error (#250)

* add version

* improve test actions

* use XY_On_Windows

---------

Co-authored-by: mikachu2333 <mikachu23333@zohomail.com>
This commit is contained in:
Mikachu2333
2025-08-17 16:15:52 +08:00
committed by GitHub
parent 41c449f4ac
commit a3cf4fcc99
3 changed files with 65 additions and 17 deletions

View File

@@ -5,7 +5,7 @@
# | Mikachu2333 <mikachu2333@zohomail.com>
# |
# Created On : <2025-06-19>
# Last Modified : <2025-08-07>
# Last Modified : <2025-08-17>
#
# Test PR
# ---------------------------------------------------------------
@@ -14,11 +14,15 @@ name: 测试PR
on:
pull_request:
types: [opened,
synchronize, # 后续提交
ready_for_review, # draft PR 转为正式 PR
review_requested,
reopened]
# 仅在开 pr、草稿转正式、手动要求 review、reopen的时候运行测试
types: [
opened,
# 因 synchronize 将导致 pr 的构建过于频繁而禁用
# synchronize, # 在 pr 者 push commit 时每次构建
ready_for_review, # draft PR 转为正式 PR
review_requested,
reopened,
]
paths:
- "src/**"
- "lib/**"
@@ -50,6 +54,12 @@ jobs:
- name: 检出代码
uses: actions/checkout@v5
- name: 创建测试文件
shell: powershell
run: |
New-Item -Path "$env:USERPROFILE\Documents\Powershell\Microsoft.PowerShell_profile.ps1" -ItemType File -Force
New-Item -Path "$env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" -ItemType File -Force
- name: 安装依赖
run: |
choco install just