Skip to content

Commit df0bdae

Browse files
🩹 [Patch]: Align code and process (#4)
## Description 🩹 [Patch]: Align code and process ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 7d85f78 commit df0bdae

File tree

6 files changed

+77
-88
lines changed

6 files changed

+77
-88
lines changed

.github/linters/.markdown-lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
###########################
2+
## Markdown Linter rules ##
3+
###########################
4+
5+
# Linter rules doc:
6+
# - https://github.com/DavidAnson/markdownlint
7+
8+
###############
9+
# Rules by id #
10+
###############
11+
MD004: false # Unordered list style
12+
MD007:
13+
indent: 2 # Unordered list indentation
14+
MD013:
15+
line_length: 808 # Line length
16+
MD026:
17+
punctuation: ".,;:!。,;:" # List of not allowed
18+
MD029: false # Ordered list item prefix
19+
MD033: false # Allow inline HTML
20+
MD036: false # Emphasis used instead of a heading
21+
22+
#################
23+
# Rules by tags #
24+
#################
25+
blank_lines: false # Error on blank lines

.github/workflows/Linter.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Linter
2+
3+
run-name: "Linter - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4+
5+
on: [pull_request]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
packages: read
14+
statuses: write
15+
16+
jobs:
17+
Lint:
18+
name: Lint code base
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repo
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Lint code base
27+
uses: super-linter/super-linter@latest
28+
env:
29+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/Process-PSModule.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ on:
1414
- labeled
1515

1616
concurrency:
17-
group: ${{ github.workflow }}
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
1819

1920
permissions:
2021
contents: write
2122
pull-requests: write
23+
statuses: write
2224

2325
jobs:
2426
Process-PSModule:

.vscode/extensions.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 81 deletions
This file was deleted.

tests/PowerShellGallery.Tests.ps1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[CmdletBinding()]
2+
Param(
3+
# Path to the module to test.
4+
[Parameter()]
5+
[string] $Path
6+
)
7+
8+
Write-Verbose "Path to the module: [$Path]" -Verbose
9+
10+
Describe 'PowerShellGallery' {
11+
Context 'Module' {
12+
It 'The module should be available' {
13+
Get-Module -Name 'PowerShellGallery' -ListAvailable | Should -Not -BeNullOrEmpty
14+
Write-Verbose (Get-Module -Name 'PowerShellGallery' -ListAvailable | Out-String) -Verbose
15+
}
16+
It 'The module should be importable' {
17+
{ Import-Module -Name 'PowerShellGallery' -Verbose -RequiredVersion 999.0.0 -Force } | Should -Not -Throw
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)