diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 922be50..5522a5b 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -160,6 +160,40 @@ jobs: command: test args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}} + - name: Integration tests + shell: bash + run: | + mkdir test-directory + touch test-directory/empty-file + mkdir test-directory/empty-subdirectory + echo -n "123" > test-directory/file-3-bytes + echo -n "1234567" > test-directory/file-7-bytes + + if [ "$RUNNER_OS" == "Windows" ]; then + curl https://download.sysinternals.com/files/DU.zip --output DU.zip + unzip DU.zip + ./du64.exe -accepteula -q test-directory/empty-file + fi + + echo "Disk usage" + echo "==========" + ${{ steps.strip.outputs.BIN_PATH }} test-directory + if [ "$RUNNER_OS" == "Windows" ]; then + ./du64.exe -q test-directory + elif [ "$RUNNER_OS" == "macOS" ]; then + du -c -k test-directory + else + du -s --block-size=1 test-directory + fi + + if [ "$RUNNER_OS" == "Linux" ]; then + echo + echo "Apparent size" + echo "=============" + ${{ steps.strip.outputs.BIN_PATH }} --apparent-size test-directory + du -s --apparent-size --block-size=1 test-directory + fi + - name: Create tarball id: package shell: bash