Skip to content

Commit

Permalink
Merge pull request #12 from btlogy/10.test-binary
Browse files Browse the repository at this point in the history
Tests for a static executable and usage prompt
  • Loading branch information
btlogy authored Jun 13, 2024
2 parents 76fb048 + 9d673c5 commit 71a82e5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,16 @@ jobs:
id: go_make
run: |
docker compose run go-shell sh -c "make mockdeps && make"
- name: Test binary
id: test_binary
run: |
# Run some basic test on the binary built earlier
echo -n "Test for a static executable: "
ldd ../trac2gitea | grep -q 'not a dynamic executable' \
&& echo PASS \
|| { echo FAIL; exit 1; }
echo -n "Test for usage prompt on execution: "
./trac2gitea --help 2>&1 | grep -q '^Usage' \
&& echo 'PASS' \
|| { echo 'FAIL'; exit 1; }

0 comments on commit 71a82e5

Please sign in to comment.