Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#115] Allow self-updates on Windows #162

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,52 @@ jobs:
throw 'error on rg.exe'
}

- if: matrix.os == 'windows-latest'
name: "Integration test: [windows] [sync-self]"
env:
SYNC_DIR: "sync-self"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir $env:SYNC_DIR

$tool = -join($env:SYNC_DIR, '\tool.exe')

copy "target\debug\tool.exe" $tool

$output = &$tool --config="tests\$env:SYNC_DIR.toml" sync

ls -l $env:SYNC_DIR

if ($output -notmatch '1 tool') {
throw 'error on tool.exe'
}

$err_output = &$tool --config="tests\$env:SYNC_DIR.toml" sync

if ($output -notmatch '0 tools') {
throw 'error on tool.exe'
}

- if: matrix.os != 'windows-latest'
name: "Integration test: [unix] [sync-self]"
env:
SYNC_DIR: "sync-self"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir $SYNC_DIR

cp "target/debug/tool" "$SYNC_DIR/tool"

"$SYNC_DIR/tool" --config="tests/$SYNC_DIR.toml" sync > /dev/null 2> out
cat out
if ! grep -q '1 tool!' out; then echo "error on: tool"; false; fi

ls -l $SYNC_DIR

"$SYNC_DIR/tool" --config="tests/$SYNC_DIR.toml" sync > /dev/null 2> out
cat out
if ! grep -q 'tools!' out; then echo "error on: tool"; false; fi

- if: matrix.os != 'windows-latest'
name: "Integration test: [unix] [sync-full]"
env:
Expand Down
Loading