Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rulasg/testinghelper-action
Execute module tests based on TestingHelper
https://github.com/rulasg/testinghelper-action
action posh powershell pwsh
Last synced: 28 days ago
JSON representation
Execute module tests based on TestingHelper
- Host: GitHub
- URL: https://github.com/rulasg/testinghelper-action
- Owner: rulasg
- License: mit
- Created: 2023-07-24T09:13:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-07T05:36:51.000Z (over 1 year ago)
- Last Synced: 2024-09-29T04:22:27.275Z (about 1 month ago)
- Topics: action, posh, powershell, pwsh
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TestingHelper GitHub Action and Reusable Workflow
[![Test testinghelper-action](https://github.com/rulasg/testinghelper-action/actions/workflows/test-action.yml/badge.svg)](https://github.com/rulasg/testinghelper-action/actions/workflows/test-action.yml)
Testing is key for a healthy and effitient development process.
[TestingHelper](https://github.com/rulasg/testingHelper#readme) will help you on different faces of the developmnet lifecycle of a powershell module including testing.
This Action and Reusable Workflow are wrappers around TestingHelper testing functionality so that you can very easily test your powershell module and add it to the development flow as a PullRequest check.
The following two samples are equivalent. The first one will call the action as a step and the second one will run calling the reusable workflow.
## Calling the action
This workflow will run the action as a step to prepare the runner to run tests.
```yaml
name: Test with TestingHelper-Actionon:
# Run as check on push request
push:# Run as check on pull request
pull_request:# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:permissions:
# To run test we only need to read the repository
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3# Setup TestingHelper for later use
- name: Setup TestingHelper
uses: rulasg/testinghelper-setup-action@v1
with:
Version: '2.0'# Use setup TestingHelper version to run tests
- name: Run tests
uses: rulasg/testinghelper-action@v2
```## Calling the reusuable workflow
This workflow will run the reusable workflow
```yaml
name: Reusable Test Workflow
on:
pull_request:
workflow_dispatch:permissions:
# To run test we only need to read the repository
contents: readjobs:
# This workflow contains a single job that will call a reusable workflow
call-reusable-testinghelper-worfklow:
uses: rulasg/testinghelper-action/.github/workflows/testinghelper-workflow.yaml@main
```