-
Notifications
You must be signed in to change notification settings - Fork 4
72 lines (68 loc) · 2.05 KB
/
Test-Results-To-Pages.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
name: Test Results to Pages
on:
push:
branches:
- main
workflow_dispatch:
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
- os: windows-latest
shell: powershell
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Pester Tests
id: pester
uses: natescherer/pester-tests-report@feature/pages-publishing
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
shell: ${{ matrix.shell }}
skip_check_run: true
tests_fail_step: true
report_name: TestResults_${{ runner.os }}_${{ matrix.shell }}
page_name: ${{ github.event.repository.name }}_TestResults_${{ 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 }}
Deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: Test
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Upload Combined Pages Artifact
uses: actions/upload-pages-artifact@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2