Skip to content

maint - update actions/potatoequality #488

maint - update actions/potatoequality

maint - update actions/potatoequality #488

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- "main"
workflow_dispatch:
env:
module_cache: PSFramework, PSDscResources, AccessControlDSC, powershell-yaml, PSScriptAnalyzer
COVERAGE_ENABLED: 'yes'
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# defaults:
# run:
# shell: powershell
jobs:
spec:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022, windows-latest]
tag: [General, Unit]
include:
- tag: General
results_file: General.Results.xml
- tag: Unit
results_file: Unit.Results.xml
steps:
- name: "checkout"
uses: actions/checkout@v4.1.0
- name: "install modules"
uses: potatoqualitee/psmodulecache@v6.2.1
with:
shell: powershell
modules-to-cache: PSFramework, PSDscResources, powershell-yaml, PSDesiredStateConfiguration, PnP.PowerShell:1.5.0
modules-to-cache-prerelease: PnP.PowerShell, PSDscResources, PSDesiredStateConfiguration
- name: Configure WinRM
uses: ./.github/actions/configure-winrm
- name: Run Unit Tests
uses: ./.github/actions/run-unit-tests
- name: Upload coverage reports to Codecov
# Only upload report once per CI run
if: |
matrix.os == 'windows-2022' &&
matrix.tag == 'Unit' &&
env.CODECOV_TOKEN != ''
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
verbose: true
acceptance:
runs-on: ${{ matrix.os }}
needs: "spec"
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022, windows-latest]
tag: [Basic]
pwshlib_source: [forge, git]
include:
- pwshlib_source: forge
pwshlib_repo: "puppetlabs/pwshlib"
pwshlib_ref: "latest" # Change to a specific version if desired
results_file: Acceptance.Forge.Results.xml
- pwshlib_source: git
pwshlib_repo: "https://github.com/puppetlabs/ruby-pwsh.git" # Change to another fork if desired
pwshlib_ref: main # Change to another branch if desired
results_file: Acceptance.Git.Results.xml
steps:
- name: "checkout"
uses: actions/checkout@4.1.0
- name: "install modules"
uses: potatoqualitee/psmodulecache@v6.2.1
with:
shell: powershell
modules-to-cache: PSFramework, PSDscResources, powershell-yaml, PSDesiredStateConfiguration, PnP.PowerShell:1.5.0
modules-to-cache-prerelease: PnP.PowerShell
- name: Install PDK
uses: ./.github/actions/install-pdk
- name: Configure WinRM
uses: ./.github/actions/configure-winrm
- name: Run Acceptance Tests
uses: ./.github/actions/run-acceptance-tests