Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PoshCode/Actions
Github actions for PowerShell projects
https://github.com/PoshCode/Actions
Last synced: 7 days ago
JSON representation
Github actions for PowerShell projects
- Host: GitHub
- URL: https://github.com/PoshCode/Actions
- Owner: PoshCode
- License: mit
- Created: 2021-01-04T04:30:36.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-24T05:39:01.000Z (about 1 year ago)
- Last Synced: 2024-08-02T17:33:46.393Z (3 months ago)
- Language: PowerShell
- Homepage:
- Size: 67.4 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - PoshCode/Actions - Github actions for PowerShell projects (PowerShell)
README
# GitHub Actions for Building and Testing PowerShell modules
I'm working on some actions for myself, but figured I'd put them here where others can use them.
They are currently very much a work in progress, not documented, and the Pester step in particular isn't fully working. Also, because they're all packaged together like this, I'm not versioning them very well for now, so when there are breaking changes, it won't be very clear which task changed.
For an example of how to use these, see my [Configuration](https://github.com/PoshCode/Configuration) module.
## Build-Module
This one's a simple wrapper for [ModuleBuilder](https://github.com/PoshCode/ModuleBuilder) to call Build-Module on every build.psd1 in your repository.
Note that this **requires** you to write the `build.psd1` manifest with appropriate values.
## GitVersion
A simple cross-platform wrapper for [GitVersion](https://github.com/GitTools/GitVersion) which caches the binary and runs gitversion in your repo. All the [GitVersion Output Variables](https://gitversion.net/docs/more-info/variables) are exposed on the output of the action.
Note that you should already have a `gitversion.yml` in your repository for this to work well.
# Install-RequiredModules
This is a wrapper for my [RequiredModules](https://github.com/Jaykul/RequiredModules) installer, which handles installing (and optionally, importing) specific versions of modules for build processes. Although this task is here, several of my other tasks use `Install-RequiredModules.ps1` as their way of ensuring the modules _they_ need are present.
To use this, you will need a `RequiredModules.psd1` in your repository. It does not support specifying your dependencies as inputs.
# Pester
This is a simple wrapper for [Pester](https://github.com/Pester/Pester) which supports Gherkin (if you specify a version of Pester that includes it, like 4.10.1 but not 5.x) and outputs a results.xml and (optionally) coverage.xml
Currently, this doesn't really _handle_ the test results, and does not _publish_ the two output xml files. It fails if pester fails, but there's no test reports or code coverage report or any of that yet. You'll want to add a step to capture this output like:
```yaml
- name: Upload Results
uses: actions/upload-artifact@v2
with:
name: Pester Results
path: ${{github.workspace}}/*.xml
```