-
Notifications
You must be signed in to change notification settings - Fork 54
77 lines (77 loc) · 2.33 KB
/
build.yml
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
75
76
77
name: Build on push
on: [push]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: GitVersion
id: gitversion
uses: PoshCode/Actions/gitversion@v1
- name: Install-RequiredModules
uses: PoshCode/Actions/install-requiredmodules@v1
- name: Build Module
id: build
uses: PoshCode/actions/build-module@v1
with:
path: ${{github.workspace}}/Source
version: ${{ steps.gitversion.outputs.LegacySemVerPadded }}
destination: ${{github.workspace}}/output
- name: Upload Build Output
uses: actions/upload-artifact@v2
with:
name: Modules
path: ${{github.workspace}}/output
- name: Upload Tests
uses: actions/upload-artifact@v2
with:
name: PesterTests
path: ${{github.workspace}}/Tests
- name: Upload RequiredModules.psd1
uses: actions/upload-artifact@v2
with:
name: RequiredModules
path: ${{github.workspace}}/RequiredModules.psd1
- name: Upload PSScriptAnalyzerSettings.psd1
uses: actions/upload-artifact@v2
with:
name: ScriptAnalyzer
path: ${{github.workspace}}/PSScriptAnalyzerSettings.psd1
lint:
needs: build
name: Run PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- name: Download Build Output
uses: actions/download-artifact@v2
- name: Invoke-ScriptAnalyzer
uses: devblackops/github-action-psscriptanalyzer@master
with:
rootPath: Modules/ModuleBuilder
repoToken: ${{ secrets.GITHUB_TOKEN }}
test:
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Download Build Output
uses: actions/download-artifact@v2
- uses: PoshCode/Actions/install-requiredmodules@v1
- uses: PoshCode/Actions/pester@v1
with:
codeCoveragePath: Modules/ModuleBuilder
moduleUnderTest: ModuleBuilder
additionalModulePaths: ${{github.workspace}}/Modules
- name: Publish Test Results
uses: zyborg/dotnet-tests-report@v1
with:
test_results_path: results.xml
- name: Upload Results
uses: actions/upload-artifact@v2
with:
name: Pester Results
path: ${{github.workspace}}/*.xml