Skip to content

Commit

Permalink
Add Unix CI test for self-update
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancisMurillo committed May 20, 2023
1 parent 6cc5a9b commit 97ac93f
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,38 @@ jobs:
$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 tool') {
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

0 comments on commit 97ac93f

Please sign in to comment.