mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-12-15 11:51:23 +00:00
(chore): Migrate CI to GitHub Actions (#3361)
* Delete appveyor.yml * Create ci.yml * Update test.ps1 * Update README.md * Fix repo name * Update test.ps1
This commit is contained in:
parent
51a0160a6f
commit
152ced134e
48
.github/workflows/ci.yml
vendored
Normal file
48
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test_powershell:
|
||||
name: WindowsPowerShell
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout Bucket
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
path: 'my_bucket'
|
||||
- name: Checkout Scoop
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ScoopInstaller/Scoop
|
||||
path: 'scoop_core'
|
||||
- name: Init and Test
|
||||
shell: powershell
|
||||
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@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
path: 'my_bucket'
|
||||
- name: Checkout Scoop
|
||||
uses: actions/checkout@v2
|
||||
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
|
||||
@ -1,4 +1,4 @@
|
||||
# Scoop Main [](https://ci.appveyor.com/project/r15ch13/scoopinstaller-main "Build Status") [](https://github.com/ScoopInstaller/Main/actions/workflows/excavator.yml)
|
||||
# Scoop Main [](https://github.com/ScoopInstaller/Main/actions/workflows/ci.yml) [](https://github.com/ScoopInstaller/Main/actions/workflows/excavator.yml)
|
||||
|
||||
Core manifests for [Scoop](https://scoop.sh), the Windows command-line installer. For manifests that fit the [Main criteria](https://github.com/ScoopInstaller/Scoop/wiki/Criteria-for-including-apps-in-the-main-bucket).
|
||||
|
||||
|
||||
39
appveyor.yml
39
appveyor.yml
@ -1,39 +0,0 @@
|
||||
version: "{build}-{branch}"
|
||||
branches:
|
||||
except:
|
||||
- gh-pages
|
||||
build: off
|
||||
deploy: off
|
||||
clone_depth: 2
|
||||
image: Visual Studio 2019
|
||||
environment:
|
||||
scoop: C:\projects\scoop
|
||||
scoop_home: C:\projects\scoop
|
||||
scoop_helpers: C:\projects\helpers
|
||||
lessmsi: '%scoop_helpers%\lessmsi\lessmsi.exe'
|
||||
innounp: '%scoop_helpers%\innounp\innounp.exe'
|
||||
matrix:
|
||||
- PowerShell: 5
|
||||
- PowerShell: Current
|
||||
cache:
|
||||
- '%USERPROFILE%\Documents\WindowsPowerShell\Modules -> appveyor.yml'
|
||||
- C:\projects\helpers -> appveyor.yml, test\bin\*.ps1
|
||||
matrix:
|
||||
fast_finish: true
|
||||
init:
|
||||
- ps: if(!(Test-Path "$env:SCOOP")) { git clone -q --depth=1 "https://github.com/ScoopInstaller/Scoop" "$env:SCOOP" }
|
||||
for:
|
||||
- matrix:
|
||||
only:
|
||||
- PowerShell: 5
|
||||
install:
|
||||
- ps: . "$env:SCOOP_HOME\test\bin\init.ps1"
|
||||
test_script:
|
||||
- ps: . "$env:SCOOP_HOME\test\bin\test.ps1" -TestPath "$env:APPVEYOR_BUILD_FOLDER"
|
||||
- matrix:
|
||||
only:
|
||||
- PowerShell: Current
|
||||
install:
|
||||
- pwsh: . "$env:SCOOP_HOME\test\bin\init.ps1"
|
||||
test_script:
|
||||
- pwsh: . "$env:SCOOP_HOME\test\bin\test.ps1" -TestPath "$env:APPVEYOR_BUILD_FOLDER"
|
||||
@ -1,4 +1,5 @@
|
||||
#requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '4.4.0' }
|
||||
#Requires -Modules @{ ModuleName = 'Pester'; MaximumVersion = '4.99' }
|
||||
|
||||
if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) }
|
||||
Invoke-Pester "$psscriptroot/.."
|
||||
$result = Invoke-Pester "$psscriptroot/.." -PassThru
|
||||
exit $result.FailedCount
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user