ci: Move smoke test to its own job

pull/47/head
Robert Dailey 2 years ago
parent f0ba34c90e
commit 418f0f6de9

@ -42,20 +42,42 @@ jobs:
shell: pwsh
run: ci/Publish.ps1 ${{ matrix.runtime }}
- name: Smoke Test
shell: pwsh
run: ci/SmokeTest.ps1 ${{ matrix.runtime }}
if: ${{ endsWith(matrix.runtime, 'linux-x64') }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: trash-${{ matrix.runtime }}
path: publish/${{ matrix.runtime }}/*
smoke:
name: Smoke Test
needs: build
strategy:
fail-fast: false
matrix:
include:
- image: windows-latest
runtime: win-x64
- image: ubuntu-latest
runtime: linux-x64
- image: macos-latest
runtime: osx-x64
runs-on: ${{ matrix.image }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: trash-${{ matrix.runtime }}
- name: Run Smoke Test
shell: pwsh
run: ci/SmokeTest.ps1 ./trash
release:
name: Release
needs: build
needs: smoke
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:

@ -1,18 +1,18 @@
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string] $runtime
[string] $PathToTrashExe
)
$ErrorActionPreference = "Stop"
if (Get-Command chmod -errorAction SilentlyContinue) {
"The chmod command was found. Setting read + execute permission."
& chmod +rx ./publish/$runtime/trash
& chmod +rx $PathToTrashExe
}
"Execute trash command to ensure basic functionality is working"
& .\publish\$runtime\trash -h
& $PathToTrashExe -h
if ($LASTEXITCODE -ne 0) {
"Trash executable failed to run with exit code: $LASTEXITCODE"
exit -1

Loading…
Cancel
Save