### Example PSModule Configuration (JSON) Source: https://github.com/psmodule/process-psmodule/blob/main/README.md An example of a JSON configuration file for the PSModule workflow. This demonstrates how to set various test and build related options. ```json { "Name": "MyAwesomeModule", "Test": { "Skip": false, "Linux": { "Skip": false }, "MacOS": { "Skip": false }, "Windows": { "Skip": false }, "SourceCode": { "Skip": false, "Linux": { "Skip": false }, "MacOS": { "Skip": false }, "Windows": { "Skip": false } }, "PSModule": { "Skip": false, "Linux": { "Skip": false }, "MacOS": { "Skip": false }, "Windows": { "Skip": false } }, "Module": { "Skip": false, "Linux": { "Skip": false }, "MacOS": { "Skip": false }, "Windows": { "Skip": false } }, "TestResults": { "Skip": false }, "CodeCoverage": { "Skip": false, "PercentTarget": 90, "StepSummaryMode": "Files" } }, "Build": { "Skip": false, "Module": { "Skip": false } } } ``` -------------------------------- ### Example PSModule Configuration (YAML) Source: https://github.com/psmodule/process-psmodule/blob/main/README.md An example of a YAML configuration file for the PSModule workflow. This demonstrates how to set various test and build related options. ```yaml Name: "MyAwesomeModule" Test: Skip: false Linux: Skip: false MacOS: Skip: false Windows: Skip: false SourceCode: Skip: false Linux: Skip: false MacOS: Skip: false Windows: Skip: false PSModule: Skip: false Linux: Skip: false MacOS: Skip: false Windows: Skip: false Module: Skip: false Linux: Skip: false MacOS: Skip: false Windows: Skip: false TestResults: Skip: false CodeCoverage: Skip: false PercentTarget: 90 StepSummaryMode: "Files" Build: Skip: false Module: Skip: false ``` -------------------------------- ### Example PSModule Configuration (PSD1) Source: https://github.com/psmodule/process-psmodule/blob/main/README.md An example of a PSD1 configuration file for the PSModule workflow. This demonstrates how to set various test and build related options. ```powershell { Name = "MyAwesomeModule" Test = @{ Skip = $false Linux = @{ Skip = $false } MacOS = @{ Skip = $false } Windows = @{ Skip = $false } SourceCode = @{ Skip = $false Linux = @{ Skip = $false } MacOS = @{ Skip = $false } Windows = @{ Skip = $false } } PSModule = @{ Skip = $false Linux = @{ Skip = $false } MacOS = @{ Skip = $false } Windows = @{ Skip = $false } } Module = @{ Skip = $false Linux = @{ Skip = $false } MacOS = @{ Skip = $false } Windows = @{ Skip = $false } } TestResults = @{ Skip = $false } CodeCoverage = @{ Skip = $false PercentTarget = 90 StepSummaryMode = "Files" } } Build = @{ Skip = $false Module = @{ Skip = $false } } } ``` -------------------------------- ### Example: Rapid Testing Configuration in PSModule.yml Source: https://github.com/psmodule/process-psmodule/blob/main/README.md This YAML snippet shows a configuration optimized for rapid testing within PSModule.yml. It skips source code, PSModule, and other module-related tests on specific operating systems, and also skips test results and code coverage, to speed up the testing feedback loop. ```yaml Test: SourceCode: Skip: true PSModule: Skip: true Module: MacOS: Skip: true Windows: Skip: true TestResults: Skip: true CodeCoverage: Skip: true Build: Docs: Skip: true ``` -------------------------------- ### Example: Setting Code Coverage Target in PSModule.yml Source: https://github.com/psmodule/process-psmodule/blob/main/README.md This YAML example demonstrates how to configure a specific code coverage target within the PSModule.yml file. It sets the 'PercentTarget' under the 'Test.CodeCoverage' section to 80, ensuring that all tests must achieve at least 80% code coverage to pass. ```yaml Test: CodeCoverage: PercentTarget: 80 ``` -------------------------------- ### Grant GitHub Pages Deployment Permissions (YAML) Source: https://github.com/psmodule/process-psmodule/blob/main/README.md This snippet details the permissions required for deploying to GitHub Pages. It includes write access for 'pages' to deploy the site and write access for 'id-token' to verify the deployment's origin. These are essential for the GitHub Pages deployment process. ```yaml permissions: pages: write # Deploy to Pages id-token: write # Verify the deployment originates from an appropriate source ``` -------------------------------- ### PSModule.yml Configuration with Defaults Source: https://github.com/psmodule/process-psmodule/blob/main/README.md This YAML snippet displays the default configuration structure for PSModule.yml. It outlines various settings related to building, testing, and publishing PowerShell modules, including options to skip specific processes and configure versioning. ```yaml Name: null Build: Skip: false Module: Skip: false Docs: Skip: false Site: Skip: false Test: Skip: false Linux: Skip: false MacOS: Skip: false Windows: Skip: false SourceCode: Skip: false Linux: Skip: false MacOS: Skip: false Windows: Skip: false PSModule: Skip: false Linux: Skip: false MacOS: Skip: false Windows: Skip: false Module: Skip: false Linux: Skip: false MacOS: Skip: false Windows: Skip: false TestResults: Skip: false CodeCoverage: Skip: false PercentTarget: 0 StepSummaryMode: 'Missed, Files' Publish: Module: Skip: false AutoCleanup: true AutoPatching: true IncrementalPrerelease: true DatePrereleaseFormat: '' VersionPrefix: 'v' MajorLabels: 'major, breaking' MinorLabels: 'minor, feature' PatchLabels: 'patch, fix' IgnoreLabels: 'NoRelease' ``` -------------------------------- ### Process-PSModule Workflow Configuration (YAML) Source: https://github.com/psmodule/process-psmodule/blob/main/README.md This snippet defines the main Process-PSModule workflow. It specifies the trigger events (pull request), concurrency settings, required permissions, and the main job that uses a reusable workflow. It also shows how to pass secrets to the reusable workflow. ```yaml name: Process-PSModule on: pull_request: branches: - main types: - closed - opened - reopened - synchronize - labeled concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: write pull-requests: write jobs: Process-PSModule: uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v2 secrets: APIKEY: ${{ secrets.APIKEY }} ``` -------------------------------- ### Grant Workflow Permissions (YAML) Source: https://github.com/psmodule/process-psmodule/blob/main/README.md This snippet shows how to grant necessary permissions to a GitHub Actions workflow. It specifies write access for contents and pull-requests, and write access for statuses. These are crucial for creating releases, commenting on PRs, and updating PR statuses. ```yaml permissions: contents: write # Create releases pull-requests: write # Create comments on the PRs statuses: write # Update the status of the PRs from the linter ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.