diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b92544a..f57e1e9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,7 +9,3 @@ updates: directory: / # Location of package manifests schedule: interval: weekly - - package-ecosystem: nuget # See documentation for possible values - directory: / # Location of package manifests - schedule: - interval: weekly diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index 5c9f300..d7650ae 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -27,3 +27,5 @@ jobs: uses: super-linter/super-linter@latest env: GITHUB_TOKEN: ${{ github.token }} + VALIDATE_MARKDOWN_PRETTIER: false + VALIDATE_YAML_PRETTIER: false diff --git a/.github/workflows/Nightly-Run.yml b/.github/workflows/Nightly-Run.yml index d5b5994..c25d806 100644 --- a/.github/workflows/Nightly-Run.yml +++ b/.github/workflows/Nightly-Run.yml @@ -7,8 +7,10 @@ on: permissions: contents: read + pull-requests: write + statuses: write jobs: Process-PSModule: - uses: PSModule/Process-PSModule/.github/workflows/CI.yml@v2 + uses: PSModule/Process-PSModule/.github/workflows/CI.yml@v3 secrets: inherit diff --git a/.github/workflows/Process-PSModule.yml b/.github/workflows/Process-PSModule.yml index b98ed7c..3d77d85 100644 --- a/.github/workflows/Process-PSModule.yml +++ b/.github/workflows/Process-PSModule.yml @@ -25,5 +25,5 @@ permissions: jobs: Process-PSModule: - uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v2 + uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v3 secrets: inherit diff --git a/examples/General.ps1 b/examples/General.ps1 deleted file mode 100644 index e193423..0000000 --- a/examples/General.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -<# - .SYNOPSIS - This is a general example of how to use the module. -#> - -# Import the module -Import-Module -Name 'PSModule' - -# Define the path to the font file -$FontFilePath = 'C:\Fonts\CodeNewRoman\CodeNewRomanNerdFontPropo-Regular.tff' - -# Install the font -Install-Font -Path $FontFilePath -Verbose - -# List installed fonts -Get-Font -Name 'CodeNewRomanNerdFontPropo-Regular' - -# Uninstall the font -Get-Font -Name 'CodeNewRomanNerdFontPropo-Regular' | Uninstall-Font -Verbose diff --git a/src/GraphQL/header.ps1 b/src/GraphQL/header.ps1 deleted file mode 100644 index cc1fde9..0000000 --- a/src/GraphQL/header.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidLongLines', '', Justification = 'Contains long links.')] -[CmdletBinding()] -param() diff --git a/src/GraphQL/public/New-PSModule.ps1 b/src/GraphQL/public/New-PSModule.ps1 deleted file mode 100644 index fcea178..0000000 --- a/src/GraphQL/public/New-PSModule.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -function New-PSModule { - <# - .SYNOPSIS - Performs tests on a module. - - .EXAMPLE - Test-PSModule -Name 'World' - - "Hello, World!" - #> - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSUseShouldProcessForStateChangingFunctions', '', Scope = 'Function', - Justification = 'Reason for suppressing' - )] - [CmdletBinding()] - param ( - # Name of the person to greet. - [Parameter(Mandatory)] - [string] $Name - ) - Write-Output "Hello, $Name!" -} diff --git a/src/GraphQL/public/Set-PSModule.ps1 b/src/GraphQL/public/Set-PSModule.ps1 deleted file mode 100644 index 4677cf3..0000000 --- a/src/GraphQL/public/Set-PSModule.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -function Set-PSModule { - <# - .SYNOPSIS - Performs tests on a module. - - .EXAMPLE - Test-PSModule -Name 'World' - - "Hello, World!" - #> - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSUseShouldProcessForStateChangingFunctions', '', Scope = 'Function', - Justification = 'Reason for suppressing' - )] - [CmdletBinding()] - param ( - # Name of the person to greet. - [Parameter(Mandatory)] - [string] $Name - ) - Write-Output "Hello, $Name!" -} diff --git a/src/GraphQL/public/Test-PSModule.ps1 b/src/GraphQL/public/Test-PSModule.ps1 deleted file mode 100644 index 5be2c11..0000000 --- a/src/GraphQL/public/Test-PSModule.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -function Test-PSModule { - <# - .SYNOPSIS - Performs tests on a module. - - .EXAMPLE - Test-PSModule -Name 'World' - - "Hello, World!" - #> - [CmdletBinding()] - param ( - # Name of the person to greet. - [Parameter(Mandatory)] - [string] $Name - ) - Write-Output "Hello, $Name!" -} diff --git a/src/GraphQL/public/Get-PSModule.ps1 b/src/functions/public/Get-PSModule.ps1 similarity index 100% rename from src/GraphQL/public/Get-PSModule.ps1 rename to src/functions/public/Get-PSModule.ps1 diff --git a/tests/GraphQL.Tests.ps1 b/tests/GraphQL.Tests.ps1 index 71b33de..da22862 100644 --- a/tests/GraphQL.Tests.ps1 +++ b/tests/GraphQL.Tests.ps1 @@ -1,11 +1,10 @@ Describe 'GraphQL' { - Context 'Module' { - It 'The module should be available' { - Get-Module -Name 'GraphQL' -ListAvailable | Should -Not -BeNullOrEmpty - Write-Verbose (Get-Module -Name 'GraphQL' -ListAvailable | Out-String) -Verbose - } - It 'The module should be importable' { - { Import-Module -Name 'GraphQL' } | Should -Not -Throw + Context 'Get-PSModule' { + It 'should greet the world' { + $Name = 'World' + $Expected = "Hello, $Name!" + $Actual = Get-PSModule -name $Name + $Actual | Should -Be $Expected } } }