Skip to content

Commit

Permalink
ci: protoc for macos-14, version in pact-protobuf-plugin doesnt suppo…
Browse files Browse the repository at this point in the history
…rt macos arm64, paths for windows
  • Loading branch information
YOU54F committed Feb 24, 2024
1 parent a4e9c2e commit 921285a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install Protoc
uses: arduino/setup-protoc@v2
if: matrix.os == 'macos-14'

- if: runner.os == 'Windows'
run: echo "ONLY_DOWNLOAD_PACT_FOR_WINDOWS=true" >> $GITHUB_ENV

Expand Down
7 changes: 6 additions & 1 deletion test/message.integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ describe('FFI integration test for the Message Consumer API', () => {
});

describe('with plugin contents (gRPC)', () => {
const protoFile = `${__dirname}/integration/grpc/route_guide.proto`;
const protoFile = path.join(
__dirname,
'integration',
'grpc',
'route_guide.proto'
);

let port: number;

Expand Down
12 changes: 10 additions & 2 deletions test/plugin-verifier.integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { loadSync } from '@grpc/proto-loader';
import * as grpc from '@grpc/grpc-js';
import express = require('express');
import * as http from 'http';
import path = require('path');
import cors = require('cors');
import bodyParser = require('body-parser');
import { returnJson } from './integration/data-utils';
Expand Down Expand Up @@ -118,14 +119,21 @@ describe('Plugin Verifier Integration Spec', () => {
},
],
logLevel: 'debug',
pactUrls: [`${__dirname}/integration/grpc/grpc.json`],
pactUrls: [
path.join(__dirname, 'integration', 'grpc', 'route_guide.proto'),
],
}).verify();

expect('').to.eq('');
});

it('runs the grpc client', async () => {
const protoFile = `${__dirname}/integration/grpc/route_guide.proto`;
const protoFile = path.join(
__dirname,
'integration',
'grpc',
'route_guide.proto'
);
const feature = await getFeature(`127.0.0.1:${GRPC_PORT}`, protoFile);

console.log(feature);
Expand Down

0 comments on commit 921285a

Please sign in to comment.