Add required module installation #91
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches-ignore: | |
- main | |
paths-ignore: | |
- .github/** | |
- README.md | |
- .all-contributorsrc | |
- CHANGELOG.md | |
- LICENSE | |
workflow_dispatch: | |
jobs: | |
Test: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: pwsh | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Set Variables | |
run: | | |
"BUILD_NUMBER=$(Get-Date -UFormat %s -Millisecond 0)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append | |
"BARE_REPOSITORY=$($env:GITHUB_REPOSITORY.split("/")[1])" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append | |
"RUNNER_OS_LOWER=$($env:RUNNER_OS.ToLower())" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Update Metadata | |
uses: natescherer/update-powershell-metadata-action@v2 | |
with: | |
path: tests/library/TestModule-${{ env.RUNNER_OS_LOWER }}/TestModule-${{ env.RUNNER_OS_LOWER }}.psd1 | |
version: 1.0.1-alpha${{ env.BUILD_NUMBER }} | |
- name: Publish to Packages | |
uses: ./ | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
target: packages | |
path: tests/library/TestModule-${{ env.RUNNER_OS_LOWER }} | |
- name: Publish to Packages (Dependencies) | |
uses: ./ | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
target: packages | |
path: tests/library/TestModule-dependencies-${{ env.RUNNER_OS_LOWER }} | |
- name: Publish to NuGet | |
uses: ./ | |
with: | |
token: ${{ secrets.CLOUDSMITH_KEY }} | |
target: nuget | |
path: tests/library/TestModule-${{ env.RUNNER_OS_LOWER }} | |
nugetUrl: https://nuget.cloudsmith.io/natescherer/publish-powershell-action/v3/index.json | |
- name: Publish to NuGet (Dependencies) | |
uses: ./ | |
with: | |
token: ${{ secrets.CLOUDSMITH_KEY }} | |
target: nuget | |
path: tests/library/TestModule-dependencies-${{ env.RUNNER_OS_LOWER }} | |
nugetUrl: https://nuget.cloudsmith.io/natescherer/publish-powershell-action/v3/index.json | |
- name: Run Pester Tests | |
id: pester | |
uses: zyborg/pester-tests-report@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
report_name: TestResults_${{ runner.os }} | |
tests_fail_step: true | |
gist_name: ${{ env.BARE_REPOSITORY }}_TestResults_${{ runner.os }}.md | |
gist_badge_label: ${{ runner.os }} | |
gist_token: ${{ secrets.PESTER_GIST_TOKEN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BUILD_NUMBER: ${{ env.BUILD_NUMBER }} |