-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (66 loc) · 2.61 KB
/
Copy pathTest-Module.yml
File metadata and controls
74 lines (66 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Test-Module
on:
workflow_call:
inputs:
Settings:
type: string
description: The settings object as a JSON string.
required: true
permissions:
contents: read # to checkout the repo and create releases on the repo
jobs:
Test-Module:
name: Test-Module (${{ matrix.OSName }})
runs-on: ${{ matrix.RunsOn }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(inputs.Settings).TestSuites.PSModule }}
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Download module artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: module
path: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/module
- name: Test-Module
uses: PSModule/Test-PSModule@8c3337136dc7cf320da39eeb50e776d04bc9ac73 # v3.0.10
with:
Name: ${{ fromJson(inputs.Settings).Name }}
Debug: ${{ fromJson(inputs.Settings).Debug }}
Prerelease: ${{ fromJson(inputs.Settings).Prerelease }}
Verbose: ${{ fromJson(inputs.Settings).Verbose }}
Version: ${{ fromJson(inputs.Settings).Version }}
WorkingDirectory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
Settings: Module
Lint-Module:
name: Lint-Module (${{ matrix.OSName }})
runs-on: ${{ matrix.RunsOn }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(inputs.Settings).TestSuites.PSModule }}
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Download module artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: module
path: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/module
- name: Lint-Module
uses: PSModule/Invoke-ScriptAnalyzer@6aeb1bc093b89f9b15c2ac3e5f9ef9e0879dc755 # v4.1.3
with:
Path: outputs/module
Debug: ${{ fromJson(inputs.Settings).Debug }}
Prerelease: ${{ fromJson(inputs.Settings).Prerelease }}
Verbose: ${{ fromJson(inputs.Settings).Verbose }}
Version: ${{ fromJson(inputs.Settings).Version }}
WorkingDirectory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
TestResult_Enabled: true
TestResult_TestSuiteName: PSModuleLint-Module-${{ runner.os }}