Skip to content

Commit

Permalink
Use python based ifstest
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Innes <[email protected]>
  • Loading branch information
andrewc12 committed Aug 5, 2023
1 parent a84d665 commit 2ecbab6
Show file tree
Hide file tree
Showing 2 changed files with 472 additions and 0 deletions.
206 changes: 206 additions & 0 deletions .github/workflows/windows-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2526,3 +2526,209 @@ jobs:










































# This is a basic workflow to help you get started with Actions
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/

test8_pyifstest:
needs: [build_windows] #, build_wsl]
timeout-minutes: 30
runs-on: windows-latest
# if: ${{ inputs.run-failing }}
steps:

- uses: actions/checkout@v3


- uses: actions/download-artifact@v3
with:
name: dev_build_inno

# - uses: actions/download-artifact@v3
# with:
# name: build result

# - name: get files
# run: Get-ChildItem -Recurse

- name: get diskdrive
run: wmic diskdrive list

# - name: Download
# uses: suisei-cn/[email protected]
# #id: innoinstaller
# with:
# url: 'https://github.com/andrewc12/zfsfiledump/raw/main/testdrives.zip'
# target: ${{github.workspace}}/
#
#
# - name: make disk
# run: |
# Expand-Archive -LiteralPath ${{github.workspace}}/testdrives.zip -DestinationPath D:\
#
# - name: Download
# uses: suisei-cn/[email protected]
# #id: innoinstaller
# with:
# url: 'https://github.com/andrewc12/zfsfiledump/raw/main/scriptname.txt'
# target: ${{github.workspace}}/
#
# - name: make disk
# run: |
# diskpart /s scriptname.txt
#
#
#
# - name: get diskdrive
# run: wmic diskdrive list
#
#
# - name: get files
# run: Get-ChildItem -Recurse


- name: get zfsexename
id: zfsinstaller
run: |
$p = Get-ChildItem | Where-Object {$_.Name -like 'OpenZFSOnWindows-*.exe'} | Select-Object -first 1
echo $p
$f = (Get-Item $p ).Name
echo $f
echo "filename=$f" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
# https://github.com/MicrosoftDocs/windows-powershell-docs/issues/266
- name: Import root certificate
run: |
$plaintextpwd = 'password1234'
$pwd = ConvertTo-SecureString -String $plaintextpwd -Force -AsPlainText
Import-PfxCertificate -FilePath ${{github.workspace}}/contrib/windows/TestCert/test_sign_cert_pass.pfx -CertStoreLocation Cert:\LocalMachine\Root -Password $pwd
Import-PfxCertificate -FilePath ${{github.workspace}}/contrib/windows/TestCert/test_sign_cert_pass.pfx -CertStoreLocation Cert:\LocalMachine\TrustedPublisher -Password $pwd
- name: debug - echo filename
run: echo ${{ steps.zfsinstaller.outputs.filename }}

# - name: debug - list
# run: ls ${{github.workspace}}\

- name: debug - list
run: ls ${{github.workspace}}\${{ steps.zfsinstaller.outputs.filename }}

#- name: install zfs
# run: ${{github.workspace}}\${{ steps.zfsinstaller.outputs.filename }} /NORESTART /ALLUSERS /VERYSILENT /LOG="${{github.workspace}}\InnoSetup-Install.log"

- name: install zfs
run: 'Start-Process -FilePath "${{github.workspace}}\${{ steps.zfsinstaller.outputs.filename }}" -Wait -ArgumentList "/NORESTART /ALLUSERS /VERYSILENT /LOG=`"${{github.workspace}}\InnoSetup-Install.log`""'

#- name: Wait for install to finish
# run: Start-Sleep -Seconds 30
# uses: iFaxity/wait-on-action@v1
# with:
# resource: 'C:\Program Files\OpenZFS On Windows\zpool.exe'

# - name: debug - print log
# run: cat "${{github.workspace}}\InnoSetup-Install.log"
#
# - name: debug - list
# run: ls "C:\Program Files"
#
# - name: debug - list
# run: ls "C:\Program Files\OpenZFS On Windows"

- name: debug - get status
run: '& "C:\Program Files\OpenZFS On Windows\zpool.exe" status'







- name: Download ifstest
uses: suisei-cn/[email protected]
id: winbtrs # Remember to give an ID if you need the output filename
with:
url: "https://github.com/andrewc12/ifstest/raw/main/ifs_test_kit.zip"
target: ${{github.workspace}}/

- name: extract
run: Expand-Archive -LiteralPath '${{ steps.winbtrs.outputs.filename }}' -DestinationPath ${{github.workspace}}\ifs_test_kit

- name: debug - list
run: ls ${{github.workspace}}\

- name: debug - list
run: ls ${{github.workspace}}\ifs_test_kit





- name: test
run: 'python.exe -u "${{github.workspace}}\contrib\windows\tests\ifstest.py" -path ${{github.workspace}}\'

- name: Adding markdown
run: |
cat ${{github.workspace}}\ifstest.log | Out-File $env:GITHUB_STEP_SUMMARY
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: build_output
path: ${{github.workspace}}/ifstest.log



- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: build_output
path: ${{github.workspace}}/TestResults.log











Loading

0 comments on commit 2ecbab6

Please sign in to comment.