Skip to content

Commit

Permalink
chore: Disable gpg tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Dec 22, 2021
1 parent e0e9289 commit 2c2267d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,6 @@ jobs:
$env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin"
[Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine")
choco install --no-progress --yes age.portable
- name: Install gpg4win
run: |
$env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin"
[Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine")
choco install --no-progress --yes gpg4win
echo "C:\Program Files (x86)\GnuPG\bin" >> $env:GITHUB_PATH
- name: Upload chocolatey log
if: failure()
uses: actions/upload-artifact@v2
Expand Down
4 changes: 4 additions & 0 deletions internal/chezmoi/gpgencryption_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package chezmoi

import (
"runtime"
"testing"

"github.com/stretchr/testify/require"
Expand All @@ -9,6 +10,9 @@ import (
)

func TestGPGEncryption(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("skipping gpg tests on Windows")
}
command := lookPathOrSkip(t, "gpg")

tempDir := t.TempDir()
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/testdata/scripts/gpg.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[windows] skip 'skippig gpg tests on Windows'
[!exec:gpg] skip 'gpg not found in $PATH'

mkhomedir
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/testdata/scripts/gpgencryption.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[windows] skip 'skippig gpg tests on Windows'
[!exec:gpg] skip 'gpg not found in $PATH'

mkhomedir
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/testdata/scripts/gpgencryptionsymmetric.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[windows] skip 'skippig gpg tests on Windows'
[!exec:gpg] skip 'gpg not found in $PATH'

mkhomedir
Expand Down

0 comments on commit 2c2267d

Please sign in to comment.