From c5efd35b16231990c53cb9f729c76c44babfd4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADcio=20Pinto=20Ferreira?= Date: Mon, 27 Nov 2023 09:06:07 -0300 Subject: [PATCH 1/3] Create blank.yml --- .github/workflows/blank.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000..d57d1e5 --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,20 @@ +name: Linting + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + lint: + name: Run PS Script Analyzer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: lint + uses: devblackops/github-action-psscriptanalyzer@master + with: + failOnErrors: true + failOnWarnings: false + failOnInfos: false From 6782221eb1a2631732fe5860aa7d5a436f80458f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADcio=20Pinto=20Ferreira?= Date: Mon, 27 Nov 2023 09:17:47 -0300 Subject: [PATCH 2/3] Rename blank.yml to linting.yml --- .github/workflows/{blank.yml => linting.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{blank.yml => linting.yml} (100%) diff --git a/.github/workflows/blank.yml b/.github/workflows/linting.yml similarity index 100% rename from .github/workflows/blank.yml rename to .github/workflows/linting.yml From ae7d824c29b3b336e366ca90abe4dcfe91a6791f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADcio=20Pinto=20Ferreira?= Date: Mon, 27 Nov 2023 09:18:12 -0300 Subject: [PATCH 3/3] Create tests.yml --- .github/workflows/tests.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..f43f997 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +name: Unit tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + test-pwsh: + defaults: + run: + shell: pwsh + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v3.1.0 + + - name: Run Pester Tests (pwsh) + run: | + Write-Output $PSVersionTable.PSVersion.Major $PSVersionTable.PSRemotingProtocolVersion.Minor + Set-PSRepository psgallery -InstallationPolicy trusted + Install-Module -Name Pester -Confirm:$false -Force + Invoke-Pester -Path "./tests" -EnableExit -Show All + + test-powershell: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3.1.0 + + - name: Run Pester Tests (powershell) + shell: powershell + run: | + Write-Output $PSVersionTable.PSVersion.Major $PSVersionTable.PSRemotingProtocolVersion.Minor + Set-PSRepository psgallery -InstallationPolicy trusted + Install-Module -Name Pester -Confirm:$false -Force + Invoke-Pester -Path "./tests" -Show All