mirror of
https://github.com/ScoopInstaller/Java.git
synced 2026-08-03 09:39:21 +08:00
chore: refactor ci workflow
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
This commit is contained in:
parent
7c29003e68
commit
fc6ac316d3
46
.github/workflows/ci.yml
vendored
46
.github/workflows/ci.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Tests
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@ -6,43 +6,33 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test_powershell:
|
||||
name: WindowsPowerShell
|
||||
test:
|
||||
name: Test
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
shell: [powershell, pwsh]
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.shell }}
|
||||
steps:
|
||||
- name: Checkout Bucket
|
||||
uses: actions/checkout@main
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
# Need at least 2 commits to properly gather changed files for linting
|
||||
fetch-depth: 2
|
||||
path: 'my_bucket'
|
||||
- name: Checkout Scoop
|
||||
uses: actions/checkout@main
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
repository: ScoopInstaller/Scoop
|
||||
path: 'scoop_core'
|
||||
- name: Init and Test
|
||||
shell: powershell
|
||||
- name: Install and cache test dependencies
|
||||
uses: potatoqualitee/psmodulecache@ee5e9494714abf56f6efbfa51527b2aec5c761b8 # v6.2.1
|
||||
with:
|
||||
modules-to-cache: BuildHelpers, Pester
|
||||
shell: ${{ matrix.shell }}
|
||||
- name: Run tests
|
||||
run: |
|
||||
$env:SCOOP_HOME="$(Resolve-Path '.\scoop_core')"
|
||||
.\scoop_core\test\bin\init.ps1
|
||||
.\my_bucket\bin\test.ps1
|
||||
test_pwsh:
|
||||
name: PowerShell
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout Bucket
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 2
|
||||
path: 'my_bucket'
|
||||
- name: Checkout Scoop
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
repository: ScoopInstaller/Scoop
|
||||
path: 'scoop_core'
|
||||
- name: Init and Test
|
||||
shell: pwsh
|
||||
run: |
|
||||
$env:SCOOP_HOME="$(Resolve-Path '.\scoop_core')"
|
||||
.\scoop_core\test\bin\init.ps1
|
||||
.\my_bucket\bin\test.ps1
|
||||
|
||||
2
.github/workflows/excavator.yml
vendored
2
.github/workflows/excavator.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
name: Excavate
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- name: Excavate
|
||||
uses: ScoopInstaller/GithubActions@main
|
||||
env:
|
||||
|
||||
2
.github/workflows/issue_comment.yml
vendored
2
.github/workflows/issue_comment.yml
vendored
@ -7,7 +7,7 @@ jobs:
|
||||
name: PullRequestHandler
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- name: PullRequestHandler
|
||||
uses: ScoopInstaller/GithubActions@main
|
||||
if: startsWith(github.event.comment.body, '/verify')
|
||||
|
||||
2
.github/workflows/issues.yml
vendored
2
.github/workflows/issues.yml
vendored
@ -7,7 +7,7 @@ jobs:
|
||||
name: IssueHandler
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- name: IssueHandler
|
||||
uses: ScoopInstaller/GithubActions@main
|
||||
if: github.event.action == 'opened' || (github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'verify'))
|
||||
|
||||
2
.github/workflows/pull_request.yml
vendored
2
.github/workflows/pull_request.yml
vendored
@ -7,7 +7,7 @@ jobs:
|
||||
name: PullRequestHandler
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- name: PullRequestHandler
|
||||
uses: ScoopInstaller/GithubActions@main
|
||||
env:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user