Skip to content

Commit bdb3f25

Browse files
committed
Diagnosing CI failures.
1 parent 4d75645 commit bdb3f25

1 file changed

Lines changed: 50 additions & 82 deletions

File tree

.github/workflows/build.yaml

Lines changed: 50 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -109,68 +109,36 @@ jobs:
109109
-p:TreatWarningsAsErrors=true
110110
-p:PackageOutputPath=${{ runner.temp }}/dist
111111
112-
- name: CI Diagnostics 1
113-
run: |
114-
echo
115-
echo Initial directory
116-
pwd
117-
118-
echo
119-
echo Going to PSql.Deploy.Tests/bin/Release/net6.0
120-
cd PSql.Deploy.Tests/bin/Release/net6.0
121-
122-
echo
123-
echo Current directory
124-
pwd
112+
- name: Test
113+
run: >
114+
dotnet test --no-build -c Release
115+
--settings Coverlet.runsettings
116+
--results-directory:${{ runner.temp }}/coverage/raw
117+
env:
118+
MSSQL_SA_PASSWORD: ${{ secrets.MSSQL_SA_PASSWORD }}
125119

126-
echo
127-
echo Directory listing
128-
ls -FAl
129-
ls -FAl deps
120+
- name: Prepare Coverage Report
121+
uses: danielpalme/ReportGenerator-GitHub-Action@5
122+
#url: https://github.com/danielpalme/ReportGenerator-GitHub-Action
123+
with:
124+
reports: ${{ runner.temp }}/coverage/raw/**/coverage.opencover.xml
125+
targetdir: ${{ runner.temp }}/coverage
126+
reporttypes: Html;MarkdownSummaryGithub;Badges
127+
verbosity: Warning
130128

131-
echo
132-
echo Contents of PSql.Deploy.psd1
133-
cat PSql.Deploy.psd1
129+
- name: Publish Coverage Summary
130+
run: >
131+
{ echo '## Coverage'; sed '/^#/d' "$REPORT_PATH"; } >> "$GITHUB_STEP_SUMMARY"
132+
env:
133+
REPORT_PATH: ${{ runner.temp }}/coverage/SummaryGithub.md
134134

135-
- name: CI Diagnostics 2
136-
shell: pwsh
137-
run: |
138-
Set-Location PSql.Deploy.Tests/bin/Release/net6.0
139-
Import-Module PSql -Verbose -PassThru | Format-List
140-
Import-Module ./PSql.Deploy.psd1 -Verbose -PassThru | Format-List
141-
Get-Module PSql | ForEach-Object ExportedCommands | ForEach-Object Values | Format-List
142-
Get-Module PSql.Deploy | ForEach-Object ExportedCommands | ForEach-Object Values | Format-List
143-
144-
# - name: Test
145-
# run: >
146-
# dotnet test --no-build -c Release
147-
# --settings Coverlet.runsettings
148-
# --results-directory:${{ runner.temp }}/coverage/raw
149-
# env:
150-
# MSSQL_SA_PASSWORD: ${{ secrets.MSSQL_SA_PASSWORD }}
151-
152-
# - name: Prepare Coverage Report
153-
# uses: danielpalme/ReportGenerator-GitHub-Action@5
154-
# #url: https://github.com/danielpalme/ReportGenerator-GitHub-Action
155-
# with:
156-
# reports: ${{ runner.temp }}/coverage/raw/**/coverage.opencover.xml
157-
# targetdir: ${{ runner.temp }}/coverage
158-
# reporttypes: Html;MarkdownSummaryGithub;Badges
159-
# verbosity: Warning
160-
161-
# - name: Publish Coverage Summary
162-
# run: >
163-
# { echo '## Coverage'; sed '/^#/d' "$REPORT_PATH"; } >> "$GITHUB_STEP_SUMMARY"
164-
# env:
165-
# REPORT_PATH: ${{ runner.temp }}/coverage/SummaryGithub.md
166-
167-
# - name: Save Coverage Report
168-
# uses: actions/upload-artifact@v4
169-
# #url: https://github.com/actions/upload-artifact
170-
# with:
171-
# name: Coverage Report
172-
# path: ${{ runner.temp }}/coverage
173-
# if-no-files-found: error
135+
- name: Save Coverage Report
136+
uses: actions/upload-artifact@v4
137+
#url: https://github.com/actions/upload-artifact
138+
with:
139+
name: Coverage Report
140+
path: ${{ runner.temp }}/coverage
141+
if-no-files-found: error
174142

175143
- name: Save Module
176144
uses: actions/upload-artifact@v4
@@ -180,26 +148,26 @@ jobs:
180148
path: ${{ runner.temp }}/dist
181149
if-no-files-found: error
182150

183-
# - name: Publish Module
184-
# if: startsWith(github.ref, 'refs/tags/release/')
185-
# run: >
186-
# dotnet nuget push "${{ runner.temp }}/dist/*.nupkg"
187-
# -s https://www.powershellgallery.com/
188-
# -k "$PSGALLERY_API_KEY"
189-
# --skip-duplicate
190-
# --no-symbols
191-
# env:
192-
# PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
193-
194-
# - name: Create Release
195-
# uses: ncipollo/release-action@v1
196-
# #url: https://github.com/ncipollo/release-action
197-
# if: startsWith(github.ref, 'refs/tags/release/')
198-
# with:
199-
# name: ${{ steps.stamp.outputs.version }}
200-
# prerelease: ${{ contains('-', steps.stamp.outputs.version) }}
201-
# draft: true
202-
# bodyFile: CHANGES.md
203-
# artifacts: ${{ runner.temp }}/dist/*nupkg
204-
# artifactErrorsFailBuild: true
205-
# token: ${{ secrets.GITHUB_TOKEN }}
151+
- name: Publish Module
152+
if: startsWith(github.ref, 'refs/tags/release/')
153+
run: >
154+
dotnet nuget push "${{ runner.temp }}/dist/*.nupkg"
155+
-s https://www.powershellgallery.com/
156+
-k "$PSGALLERY_API_KEY"
157+
--skip-duplicate
158+
--no-symbols
159+
env:
160+
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
161+
162+
- name: Create Release
163+
uses: ncipollo/release-action@v1
164+
#url: https://github.com/ncipollo/release-action
165+
if: startsWith(github.ref, 'refs/tags/release/')
166+
with:
167+
name: ${{ steps.stamp.outputs.version }}
168+
prerelease: ${{ contains('-', steps.stamp.outputs.version) }}
169+
draft: true
170+
bodyFile: CHANGES.md
171+
artifacts: ${{ runner.temp }}/dist/*nupkg
172+
artifactErrorsFailBuild: true
173+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)