Skip to content

Commit

Permalink
Adds Testspace integration (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Hunt <[email protected]>
  • Loading branch information
cdhunt and Chris Hunt authored Jan 5, 2024
1 parent 972594a commit 73b50c7
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 8 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/powershell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,25 @@ jobs:
name: build
path: publish

- name: Install Utils
shell: pwsh
run: |
apt-get update
apt-get install curl jq -y
- uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

- name: Test
shell: pwsh
run: ./build.ps1 test

- name: Publish Results to Testspace
run: testspace "[v${{ matrix.pwshv }}]testResults.xml"

if: always()

test5:
permissions:
contents: read # for actions/checkout to fetch code
Expand All @@ -104,10 +119,18 @@ jobs:
name: build
path: publish

- uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

- name: Test
shell: powershell
run: ./build.ps1 test

- name: Publish Results to Testspace
run: testspace "[v5.1]testResults.xml"
if: always()

publish:
permissions:
contents: read # for actions/checkout to fetch code
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ Load configuration data from multiple file types.

## CI Status

[![PowerShell](https://github.com/cdhunt/Import-ConfigData/actions/workflows/powershell.yml/badge.svg)](https://github.com/cdhunt/Import-ConfigData/actions/workflows/powershell.yml)
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/cdhunt/Import-ConfigData/powershell.yml?style=flat&logo=github)
[![Testspace pass ratio](https://img.shields.io/testspace/pass-ratio/cdhunt/cdhunt%3AImport-ConfigData/main)](https://cdhunt.testspace.com/projects/67973/spaces)
[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/Import-ConfigData.svg?color=%235391FE&label=PowerShellGallery&logo=powershell&style=flat)](https://www.powershellgallery.com/packages/Import-ConfigData)

## Install
![Build history](https://buildstats.info/github/chart/cdhunt/Import-ConfigData?branch=main)

[powershellgallery.com/packages/Import-ConfigData](https://www.powershellgallery.com/packages/Import-ConfigData)
## Install

`Install-Module -Name Import-ConfigData` or `Install-PSResource -Name Import-ConfigData`

![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/Import-ConfigData?color=%235391FE&style=flat)

## Docs

[Full Docs](docs)
Expand Down
16 changes: 12 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,21 @@ function Build {
function Test {
param ()

if ($null -eq (Get-Module Pester -ListAvailable)) {
Install-Module -Name Pester -Confirm:$false -Force
if ($null -eq (Get-Module Pester -ListAvailable | Where-Object { [version]$_.Version -ge [version]"5.5.0" })) {
Install-Module -Name Pester -MinimumVersion 5.5.0 -Confirm:$false -Force
}

Invoke-Pester -Path test -Output detailed
}
$config = New-PesterConfiguration -Hashtable @{
Run = @{ Path = "test" }
TestResult = @{
Enabled = $true
OutputFormat = "NUnitXml"
}
Output = @{ Verbosity = "Detailed" }
}

Invoke-Pester -Configuration $config
}

function ChangeLog {
param ()
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "0.1",
"version": "0.2.0",
"cloudBuild": {
"buildNumber": {
"enabled": true
Expand Down

0 comments on commit 73b50c7

Please sign in to comment.