From c385ca9012040fe15e521b326a2c80914666cde1 Mon Sep 17 00:00:00 2001 From: dfinke Date: Sun, 12 Jun 2022 13:46:54 -0400 Subject: [PATCH 01/14] add branches --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ba4a79f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +on: + push: + branches: + - master + - Set-up-GHA-CI/CD + + pull_request: + +jobs: + validate: + runs-on: ${{ matrix.os }} + strategy: + matrix: + # os: [windows-latest] + # os: [windows-latest, ubuntu-18.04] + os: [windows-latest, ubuntu-latest, macos-latest] + # os: [ubuntu-18.04] + steps: + - uses: actions/checkout@v1 + - name: Run Continuous Integration + shell: pwsh + run : | + # ./ContinuousIntegration/ContinuousIntegration.ps1 + "Hello World" \ No newline at end of file From a4bed31e1e633f6a421289e9e791869b0974300e Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 13:52:12 -0400 Subject: [PATCH 02/14] list pester version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba4a79f..8f9f5de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,4 +21,4 @@ jobs: shell: pwsh run : | # ./ContinuousIntegration/ContinuousIntegration.ps1 - "Hello World" \ No newline at end of file + gmo -list pester \ No newline at end of file From c6a06cc325ebdf5ba8f01b3277b01f5a0ea14d3e Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 13:55:10 -0400 Subject: [PATCH 03/14] see what fails --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f9f5de..34956e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,14 @@ jobs: strategy: matrix: # os: [windows-latest] - # os: [windows-latest, ubuntu-18.04] - os: [windows-latest, ubuntu-latest, macos-latest] - # os: [ubuntu-18.04] + # os: [windows-latest, ubuntu-latest] + # os: [windows-latest, ubuntu-latest, macos-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v1 - name: Run Continuous Integration shell: pwsh run : | # ./ContinuousIntegration/ContinuousIntegration.ps1 - gmo -list pester \ No newline at end of file + cd ./__tests__ + Invoke-Pester -Output Detailed \ No newline at end of file From 04b5a9a0967167d4023e1cd9abbdfe2542e70ddc Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 13:57:27 -0400 Subject: [PATCH 04/14] install dependencies for autosize --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34956e2..92a7978 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,5 +21,6 @@ jobs: shell: pwsh run : | # ./ContinuousIntegration/ContinuousIntegration.ps1 + apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev cd ./__tests__ Invoke-Pester -Output Detailed \ No newline at end of file From e279cd785e6f44e518e3d185f616a6376de31f24 Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 13:59:37 -0400 Subject: [PATCH 05/14] sudo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92a7978..9f26f7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,6 @@ jobs: shell: pwsh run : | # ./ContinuousIntegration/ContinuousIntegration.ps1 - apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev + sudo apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev cd ./__tests__ Invoke-Pester -Output Detailed \ No newline at end of file From 12f1f23d51d29a5a0f0e110eadd858c4845f3ee7 Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 14:19:49 -0400 Subject: [PATCH 06/14] chk platform --- .github/workflows/ci.yml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f26f7b..d6d491f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,20 +7,31 @@ on: pull_request: jobs: - validate: - runs-on: ${{ matrix.os }} + validate: strategy: matrix: - # os: [windows-latest] - # os: [windows-latest, ubuntu-latest] # os: [windows-latest, ubuntu-latest, macos-latest] - os: [ubuntu-latest] + os: [windows-latest, ubuntu-latest] steps: - - uses: actions/checkout@v1 - - name: Run Continuous Integration + - uses: actions/checkout@v1 + - name: Run Tests shell: pwsh run : | # ./ContinuousIntegration/ContinuousIntegration.ps1 - sudo apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev - cd ./__tests__ - Invoke-Pester -Output Detailed \ No newline at end of file + # sudo apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev + # cd ./__tests__ + # Invoke-Pester -Output Detailed + if($PSVersionTable.Platform -eq 'Win32NT') { + "start process" + } elseif ($PSVersionTable.Platform -eq 'Unix') { + "curl" + } + + # runs-on: windows-latest + # steps: + # - uses: actions/checkout@v1 + # - name: Run Tests on Windows + # shell: pwsh + # run : | + # cd ./__tests__ + # Invoke-Pester -Output Detailed \ No newline at end of file From 64ff97b486ebed992447a31af1dde9b4a5556c2e Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 14:30:16 -0400 Subject: [PATCH 07/14] fix yml --- .github/workflows/ci.yml | 52 +++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6d491f..71ac117 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,31 +7,51 @@ on: pull_request: jobs: - validate: + validate: + runs-on: ${{ matrix.os }} strategy: matrix: - # os: [windows-latest, ubuntu-latest, macos-latest] os: [windows-latest, ubuntu-latest] + # os: [windows-latest, ubuntu-latest] + # os: [windows-latest, ubuntu-latest, macos-latest] + # os: [ubuntu-latest] steps: - - uses: actions/checkout@v1 - - name: Run Tests + - uses: actions/checkout@v1 + - name: Run Continuous Integration shell: pwsh run : | - # ./ContinuousIntegration/ContinuousIntegration.ps1 - # sudo apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev - # cd ./__tests__ - # Invoke-Pester -Output Detailed if($PSVersionTable.Platform -eq 'Win32NT') { "start process" } elseif ($PSVersionTable.Platform -eq 'Unix') { "curl" } - # runs-on: windows-latest - # steps: - # - uses: actions/checkout@v1 - # - name: Run Tests on Windows - # shell: pwsh - # run : | - # cd ./__tests__ - # Invoke-Pester -Output Detailed \ No newline at end of file +# jobs: +# validate: +# strategy: +# matrix: +# # os: [windows-latest, ubuntu-latest, macos-latest] +# os: [windows-latest, ubuntu-latest] +# steps: +# - uses: actions/checkout@v1 +# - name: Run Tests +# shell: pwsh +# run : | +# # ./ContinuousIntegration/ContinuousIntegration.ps1 +# # sudo apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev +# # cd ./__tests__ +# # Invoke-Pester -Output Detailed +# if($PSVersionTable.Platform -eq 'Win32NT') { +# "start process" +# } elseif ($PSVersionTable.Platform -eq 'Unix') { +# "curl" +# } + +# # runs-on: windows-latest +# # steps: +# # - uses: actions/checkout@v1 +# # - name: Run Tests on Windows +# # shell: pwsh +# # run : | +# # cd ./__tests__ +# # Invoke-Pester -Output Detailed \ No newline at end of file From e3149b7b406078246b92a0a86f23830b9feb04a6 Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 14:42:41 -0400 Subject: [PATCH 08/14] install ace --- .github/workflows/ci.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71ac117..742f2ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,19 +12,27 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest] - # os: [windows-latest, ubuntu-latest] # os: [windows-latest, ubuntu-latest, macos-latest] - # os: [ubuntu-latest] steps: - uses: actions/checkout@v1 - name: Run Continuous Integration shell: pwsh run : | - if($PSVersionTable.Platform -eq 'Win32NT') { - "start process" - } elseif ($PSVersionTable.Platform -eq 'Unix') { - "curl" - } + # if($PSVersionTable.Platform -eq 'Win32NT') { + # 'Install ACE for Invoke-ExcelQuery testing' + # Start-Process ./ace/ace.exe -Wait -ArgumentList "/quiet /passive /norestart" + # } elseif ($PSVersionTable.Platform -eq 'Unix') { + # mkdir ./ace + # curl -o ./ace/ace.exe https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/accessdatabaseengine_X64.exe + # } + + mkdir ./ace + Invoke-Restmethod https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/accessdatabaseengine_X64.exe -OutFile ./ace/ace.exe + Start-Process ./ace/ace.exe -Wait -ArgumentList "/quiet /passive /norestart" + + # cd ./__tests__ + # Invoke-Pester -Output Detailed + # jobs: # validate: From ebde9269aa9aa5c0dc5f422be6df79f715d09576 Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 14:44:17 -0400 Subject: [PATCH 09/14] just windows --- .github/workflows/ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 742f2ea..03c7cdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,13 +26,14 @@ jobs: # curl -o ./ace/ace.exe https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/accessdatabaseengine_X64.exe # } - mkdir ./ace - Invoke-Restmethod https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/accessdatabaseengine_X64.exe -OutFile ./ace/ace.exe - Start-Process ./ace/ace.exe -Wait -ArgumentList "/quiet /passive /norestart" - - # cd ./__tests__ - # Invoke-Pester -Output Detailed + if($PSVersionTable.Platform -eq 'Win32NT') { + mkdir ./ace + Invoke-Restmethod https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/accessdatabaseengine_X64.exe -OutFile ./ace/ace.exe + Start-Process ./ace/ace.exe -Wait -ArgumentList "/quiet /passive /norestart" + } + cd ./__tests__ + Invoke-Pester -Output Detailed # jobs: # validate: From 98256c61e883a21f5d2f3f1ae05b14fc87282700 Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 14:48:37 -0400 Subject: [PATCH 10/14] include test for Invoke-ExcelQuery --- .github/workflows/ci.yml | 45 +++------------------------------------- 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03c7cdf..8f5158b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,56 +11,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, ubuntu-latest] - # os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v1 - name: Run Continuous Integration shell: pwsh run : | - # if($PSVersionTable.Platform -eq 'Win32NT') { - # 'Install ACE for Invoke-ExcelQuery testing' - # Start-Process ./ace/ace.exe -Wait -ArgumentList "/quiet /passive /norestart" - # } elseif ($PSVersionTable.Platform -eq 'Unix') { - # mkdir ./ace - # curl -o ./ace/ace.exe https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/accessdatabaseengine_X64.exe - # } - if($PSVersionTable.Platform -eq 'Win32NT') { - mkdir ./ace + $null = mkdir ./ace Invoke-Restmethod https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/accessdatabaseengine_X64.exe -OutFile ./ace/ace.exe Start-Process ./ace/ace.exe -Wait -ArgumentList "/quiet /passive /norestart" } cd ./__tests__ - Invoke-Pester -Output Detailed - -# jobs: -# validate: -# strategy: -# matrix: -# # os: [windows-latest, ubuntu-latest, macos-latest] -# os: [windows-latest, ubuntu-latest] -# steps: -# - uses: actions/checkout@v1 -# - name: Run Tests -# shell: pwsh -# run : | -# # ./ContinuousIntegration/ContinuousIntegration.ps1 -# # sudo apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev -# # cd ./__tests__ -# # Invoke-Pester -Output Detailed -# if($PSVersionTable.Platform -eq 'Win32NT') { -# "start process" -# } elseif ($PSVersionTable.Platform -eq 'Unix') { -# "curl" -# } - -# # runs-on: windows-latest -# # steps: -# # - uses: actions/checkout@v1 -# # - name: Run Tests on Windows -# # shell: pwsh -# # run : | -# # cd ./__tests__ -# # Invoke-Pester -Output Detailed \ No newline at end of file + Invoke-Pester -Output Detailed \ No newline at end of file From 89f90b77fb1fbdb71d1eba58dfb827946e547622 Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 15:06:53 -0400 Subject: [PATCH 11/14] try failing tests --- __tests__/fail.tests.ps1 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 __tests__/fail.tests.ps1 diff --git a/__tests__/fail.tests.ps1 b/__tests__/fail.tests.ps1 new file mode 100644 index 0000000..a41a74d --- /dev/null +++ b/__tests__/fail.tests.ps1 @@ -0,0 +1,5 @@ +Describe "Test failed tests for GHA" { + It "Should fail" { + $true | Should -BeFalse + } +} \ No newline at end of file From 4feaee46d22307d4bae3333b9c86c30ab957d460 Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 15:11:36 -0400 Subject: [PATCH 12/14] fail tests on windows --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f5158b..4df3c6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest] + # os: [windows-latest, ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v1 - name: Run Continuous Integration From 6cbf4efd1db60dc58515f7b3cf0356a7214955f2 Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 15:14:27 -0400 Subject: [PATCH 13/14] try mac --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4df3c6e..44b9596 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest] - # os: [windows-latest, ubuntu-latest, macos-latest] + os: [macos-latest] + # os: [windows-latest, ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v1 - name: Run Continuous Integration From 5d3694570823380bd6a111fe0c49ccc748b4b21e Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Sun, 12 Jun 2022 15:18:56 -0400 Subject: [PATCH 14/14] remove fail tests --- .github/workflows/ci.yml | 3 +-- __tests__/fail.tests.ps1 | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 __tests__/fail.tests.ps1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44b9596..8eb20c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest] - # os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v1 - name: Run Continuous Integration diff --git a/__tests__/fail.tests.ps1 b/__tests__/fail.tests.ps1 deleted file mode 100644 index a41a74d..0000000 --- a/__tests__/fail.tests.ps1 +++ /dev/null @@ -1,5 +0,0 @@ -Describe "Test failed tests for GHA" { - It "Should fail" { - $true | Should -BeFalse - } -} \ No newline at end of file