Skip to content

Merge pull request #11 from mdowst/script_path_patch #46

Merge pull request #11 from mdowst/script_path_patch

Merge pull request #11 from mdowst/script_path_patch #46

Workflow file for this run

name: build module
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-module:
name: Run build and upload artifacts
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Install Modules
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module ModuleBuilder,PSScriptAnalyzer,EZOut
Install-Module Pester -MinimumVersion 5.5.0
- name: Run build
shell: pwsh
run: |
$Version = git describe --tags --abbrev=0
Write-Host "Version : $Version"
.\tools\build.ps1 -Version $Version
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: psnotes-build
path: bin
- name: Build Tests
shell: pwsh
run: .\tools\tests-build.ps1
- name: Build Report
uses: dorny/test-reporter@v2
if: ${{ !cancelled() }}
with:
name: Build Tests
path: 'bin/*.TestResults.xml'
reporter: java-junit
test-module:
needs: build-module
name: Test Module
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: bin
pattern: psnotes-build
merge-multiple: true
- run: ls -R bin
- name: Install Modules
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module Pester -MinimumVersion 5.5.0
Install-Module PSScriptAnalyzer
- name: Unit Tests
shell: pwsh
run: .\tools\tests.ps1
- name: Test Report
uses: dorny/test-reporter@v2
if: ${{ !cancelled() }}
with:
name: Pester Tests
path: 'bin/*.TestResults.xml'
reporter: java-junit