diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 382d4dbd..b56bdb55 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -158,6 +158,8 @@ jobs: - if: runner.os == 'Windows' run: echo "ONLY_DOWNLOAD_PACT_FOR_WINDOWS=true" >> $GITHUB_ENV + - if: matrix.os == 'macos-14' + run: brew install protobuf - run: LOG_LEVEL=debug ./script/ci/unpack-and-test.sh if: ${{ matrix.docker != true }} @@ -178,11 +180,11 @@ jobs: - if: ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'amd64' }} name: test linux amd64 musl - run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:20-alpine bin/sh -c 'apk add bash curl gcompat shared-mime-info && cd /home && /home/script/ci/unpack-and-test.sh' + run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:20-alpine bin/sh -c 'apk add bash curl gcompat shared-mime-info file && cd /home && /home/script/ci/unpack-and-test.sh' - if: ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'arm64' }} name: test linux arm64 musl - run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e SKIP_STANDALONE_TESTS --rm node:20-alpine bin/sh -c 'apk add bash curl libc6-compat gcompat shared-mime-info && cd /home && /home/script/ci/unpack-and-test.sh' + run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e SKIP_STANDALONE_TESTS --rm node:20-alpine bin/sh -c 'apk add bash curl libc6-compat gcompat shared-mime-info file && cd /home && /home/script/ci/unpack-and-test.sh' env: SKIP_STANDALONE_TESTS: true diff --git a/script/install-plugin-cli.sh b/script/install-plugin-cli.sh index 2007a300..1947a329 100755 --- a/script/install-plugin-cli.sh +++ b/script/install-plugin-cli.sh @@ -15,40 +15,12 @@ detect_osarch() { # detect_musl case $(uname -sm) in 'Linux x86_64') - if ldd /bin/ls >/dev/null 2>&1; then - ldd_output=$(ldd /bin/ls) - case "$ldd_output" in - *musl*) - os='linux' - arch='x86_64-musl' - ;; - *) - os='linux' - arch='x86_64' - ;; - esac - else - os='linux' - arch='x86_64' - fi + os='linux' + arch='x86_64' ;; 'Linux aarch64') - if ldd /bin/ls >/dev/null 2>&1; then - ldd_output=$(ldd /bin/ls) - case "$ldd_output" in - *musl*) - os='linux' - arch='aarch64-musl' - ;; - *) - os='linux' - arch='aarch64' - ;; - esac - else - os='linux' - arch='aarch64' - fi + os='linux' + arch='aarch64' ;; 'Darwin x86' | 'Darwin x86_64') os='osx' @@ -81,6 +53,7 @@ if [ ! -f ~/.pact/bin/pact-plugin-cli ]; then echo " Downloading from: ${DOWNLOAD_LOCATION}" curl -L -o ~/.pact/bin/pact-plugin-cli-${os}-${arch}.gz "${DOWNLOAD_LOCATION}" echo " Downloaded $(file ~/.pact/bin/pact-plugin-cli-${os}-${arch}.gz)" - gunzip -N -f ~/.pact/bin/pact-plugin-cli-${os}-${arch}.gz + gunzip -f ~/.pact/bin/pact-plugin-cli-${os}-${arch}.gz + mv ~/.pact/bin/pact-plugin-cli-${os}-${arch} ~/.pact/bin/pact-plugin-cli chmod +x ~/.pact/bin/pact-plugin-cli fi \ No newline at end of file diff --git a/test/message.integration.spec.ts b/test/message.integration.spec.ts index 90227942..a86b242c 100644 --- a/test/message.integration.spec.ts +++ b/test/message.integration.spec.ts @@ -146,7 +146,11 @@ describe('FFI integration test for the Message Consumer API', () => { (skipPluginTests ? describe.skip : describe)( 'with plugin contents (gRPC)', () => { - const protoFile = `${__dirname}/integration/grpc/route_guide.proto`; + let protoFile = `${__dirname}/integration/grpc/route_guide.proto`; + if (process.platform === 'win32') { + const escapedProtoFile = protoFile.replace(/\\/g, '\\\\'); + protoFile = escapedProtoFile; + } let port: number;