11name : Build on push
2-
32on : [push]
4-
53jobs :
64 build :
75 runs-on : windows-latest
86 steps :
9- - name : Checkout
10- uses : actions/checkout@v2
11- - name : GitVersion
12- id : gitversion
13- uses : PoshCode/Actions/gitversion@v1
14- - name : Install-RequiredModules
15- uses : PoshCode/Actions/install-requiredmodules@v1
16- - name : Build Module
17- id : build
18- uses : PoshCode/actions/build-module@v1
19- with :
20- path : ${{github.workspace}}/Source
21- version : ${{ steps.gitversion.outputs.LegacySemVerPadded }}
22- destination : ${{github.workspace}}/output
23- - name : Upload Build Output
24- uses : actions/upload-artifact@v2
25- with :
26- name : Modules
27- path : ${{github.workspace}}/output
28- - name : Upload Tests
29- uses : actions/upload-artifact@v2
30- with :
31- name : PesterTests
32- path : ${{github.workspace}}/Specs
33- - name : Upload RequiredModules.psd1
34- uses : actions/upload-artifact@v2
35- with :
36- name : RequiredModules
37- path : ${{github.workspace}}/RequiredModules.psd1
38- - name : Upload PSScriptAnalyzerSettings.psd1
39- uses : actions/upload-artifact@v2
40- with :
41- name : ScriptAnalyzer
42- path : ${{github.workspace}}/PSScriptAnalyzerSettings.psd1
7+ - name : Checkout
8+ uses : actions/checkout@v2
9+ - name : GitVersion
10+ id : gitversion
11+ uses : PoshCode/Actions/gitversion@v1
12+ - name : Install-RequiredModules
13+ uses : PoshCode/Actions/install-requiredmodules@v1
14+ - name : Build Module
15+ id : build
16+ uses : PoshCode/actions/build-module@v1
17+ with :
18+ path : ${{github.workspace}}/Source
19+ version : ${{ steps.gitversion.outputs.LegacySemVerPadded }}
20+ destination : ${{github.workspace}}/output
21+ - name : Upload Build Output
22+ uses : actions/upload-artifact@v2
23+ with :
24+ name : Modules
25+ path : ${{github.workspace}}/output
26+ - name : Upload Tests
27+ uses : actions/upload-artifact@v2
28+ with :
29+ name : PesterTests
30+ path : ${{github.workspace}}/Specs
31+ - name : Upload RequiredModules.psd1
32+ uses : actions/upload-artifact@v2
33+ with :
34+ name : RequiredModules
35+ path : ${{github.workspace}}/RequiredModules.psd1
36+ - name : Upload PSScriptAnalyzerSettings.psd1
37+ uses : actions/upload-artifact@v2
38+ with :
39+ name : ScriptAnalyzer
40+ path : ${{github.workspace}}/PSScriptAnalyzerSettings.psd1
41+ lint :
42+ name : Run PSScriptAnalyzer
43+ runs-on : ubuntu-latest
44+ steps :
45+ - name : Download Build Output
46+ uses : actions/download-artifact@v2
47+ - name : Invoke-ScriptAnalyzer
48+ uses : devblackops/github-action-psscriptanalyzer@master
4349 test :
4450 runs-on : ${{ matrix.os }}
4551 strategy :
@@ -48,20 +54,20 @@ jobs:
4854 os : [windows-2016, windows-latest, ubuntu-latest, macos-latest]
4955 needs : build
5056 steps :
51- - name : Download Build Output
52- uses : actions/download-artifact@v2
53- - uses : PoshCode/Actions/install-requiredmodules@v1
54- - uses : PoshCode/Actions/pester@v1
55- with :
56- codeCoveragePath : Modules/ModuleBuilder
57- moduleUnderTest : ModuleBuilder
58- additionalModulePaths : ${{github.workspace}}/Modules
59- - name : Publish Test Results
60- uses : zyborg/dotnet-tests-report@v1
61- with :
62- test_results_path : results.xml
63- - name : Upload Results
64- uses : actions/upload-artifact@v2
65- with :
66- name : Pester Results
67- path : ${{github.workspace}}/*.xml
57+ - name : Download Build Output
58+ uses : actions/download-artifact@v2
59+ - uses : PoshCode/Actions/install-requiredmodules@v1
60+ - uses : PoshCode/Actions/pester@v1
61+ with :
62+ codeCoveragePath : Modules/ModuleBuilder
63+ moduleUnderTest : ModuleBuilder
64+ additionalModulePaths : ${{github.workspace}}/Modules
65+ - name : Publish Test Results
66+ uses : zyborg/dotnet-tests-report@v1
67+ with :
68+ test_results_path : results.xml
69+ - name : Upload Results
70+ uses : actions/upload-artifact@v2
71+ with :
72+ name : Pester Results
73+ path : ${{github.workspace}}/*.xml
0 commit comments