forked from jpogran/PuppetDscBuilder
-
Notifications
You must be signed in to change notification settings - Fork 12
96 lines (82 loc) · 2.53 KB
/
ci.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- "main"
workflow_dispatch:
env:
module_cache: PSFramework, PSDscResources, AccessControlDSC, powershell-yaml, PSScriptAnalyzer
COVERAGE_ENABLED: 'yes'
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
defaults:
run:
shell: powershell
jobs:
spec:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
tag: [General, Unit]
include:
- tag: General
results_file: General.Results.xml
- tag: Unit
results_file: Unit.Results.xml
steps:
- name: "checkout"
uses: actions/checkout@v3
- name: "install modules"
uses: potatoqualitee/[email protected]
with:
shell: powershell
modules-to-cache: ${{ env.module_cache }}
- name: Configure WinRM
uses: ./.github/actions/configure-winrm
- name: Run Unit Tests
uses: ./.github/actions/run-unit-tests
- name: Upload coverage reports to Codecov
# Only upload report once per CI run
if: matrix.os == 'windows-2022' && matrix.tag == 'Unit'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
verbose: true
acceptance:
runs-on: ${{ matrix.os }}
needs: "spec"
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
tag: [Basic]
pwshlib_source: [forge, git]
include:
- pwshlib_source: forge
pwshlib_repo: "puppetlabs/pwshlib"
pwshlib_ref: "latest" # Change to a specific version if desired
results_file: Acceptance.Forge.Results.xml
- pwshlib_source: git
pwshlib_repo: "https://github.com/puppetlabs/ruby-pwsh.git" # Change to another fork if desired
pwshlib_ref: main # Change to another branch if desired
results_file: Acceptance.Git.Results.xml
steps:
- name: "checkout"
uses: actions/checkout@v3
- name: "install modules"
uses: potatoqualitee/[email protected]
with:
shell: powershell
modules-to-cache: ${{ env.module_cache }}
- name: Install PDK
uses: ./.github/actions/install-pdk
- name: Configure WinRM
uses: ./.github/actions/configure-winrm
- name: Run Acceptance Tests
uses: ./.github/actions/run-acceptance-tests