-
Notifications
You must be signed in to change notification settings - Fork 4
101 lines (97 loc) · 2.8 KB
/
PublishTestResults.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
97
98
99
100
101
name: Publish Test Results
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
Test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
shell: [pwsh, powershell]
exclude:
- os: ubuntu-latest
shell: powershell
- os: macos-latest
shell: powershell
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Pester Tests
id: pester
uses: natescherer/pester-tests-report@combined
with:
shell: ${{ matrix.shell }}
skip_check_run: true
tests_fail_step: true
report_name: TestResults_${{ runner.os }}_${{ matrix.shell }}
page_name: ${{ runner.os }}_${{ matrix.shell }}
page_badge_label: ${{ runner.os }} ${{ matrix.shell }}
coverage_paths: src\private,src\public
coverage_report_name: CoverageResults_${{ runner.os }}_${{ matrix.shell }}
coverage_page: true
coverage_page_badge_label: Code Coverage
- name: Upload Pages Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}_${{ matrix.shell }}
path: ${{ steps.pester.outputs.pages_path }}
- name: Upload to Codecov
uses: codecov/codecov-action@v3
if: runner.os == 'Linux'
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
Deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: Test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: testreports
- name: Write File
uses: DamianReeves/[email protected]
with:
path: _config.yml
contents: |
markdown: GFM
remote_theme: pages-themes/[email protected]
exclude:
- .github/
- src/
- tests/
plugins:
- jekyll-remote-theme
- jemoji
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: .
destination: ./_site
- name: Generate Directory Listings
uses: jayanta525/[email protected]
with:
FOLDER: ./_site
- name: Upload Combined Pages Artifact
uses: actions/upload-pages-artifact@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2