Skip to content

Commit

Permalink
ci: skip ruby standalone tests on arm64 linux due to qemu errors
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Feb 13, 2024
1 parent bd41a2c commit 554968f
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,16 @@ jobs:
- if: runner.os == 'Windows'
run: echo "ONLY_DOWNLOAD_PACT_FOR_WINDOWS=true" >> $GITHUB_ENV

- if: runner.os == 'Linux' && matrix.docker == 'true' && matrix.arch == 'arm64'
run: echo "SKIP_STANDALONE=true" >> $GITHUB_ENV

- run: FETCH_ASSETS=true REPO=you54f/pact-js-core ./script/ci/check-release-libs.sh --fetch-assets -t v15.0.0
env:
GITHUB_TOKEN: ${{ github.token }}
- run: ./script/ci/download-standalone-and-test.sh
if: matrix.docker != true


# Linux aarch64 tests are skipped as QEMU fails when executing the ruby binaries
# Related comment: https://github.com/phusion/passenger/issues/2288#issuecomment-1387625121
- name: Set up QEMU
Expand All @@ -217,7 +221,7 @@ jobs:
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }} /bin/bash -c 'npm config set cache /tmp && apt install -y shared-mime-info && cd /home/node/app && ./script/ci/download-standalone-and-test.sh'
- if: runner.os == 'Linux' && matrix.docker == true && matrix.musl == true
name: test linux ${{ matrix.arch }} musl # Setting the cache location is a workaround for node 16 install errors https://github.com/npm/cli/issues/5114
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine /bin/sh -c 'npm config set cache /tmp && apk add bash curl shared-mime-info && cd /home/node/app && ./script/ci/download-standalone-and-test.sh'
run: docker run -v $PWD:/home/node/app --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine /bin/sh -c 'npm config set cache /tmp && apk add bash curl shared-mime-info gcompat libc6-compat gzip file protoc protobuf-dev && cd /home/node/app && ./script/ci/download-standalone-and-test.sh'

# release_dry_run:
# runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion src/can-deploy/can-deploy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import brokerMock from '../../test/integration/broker-mock';
const { expect } = chai;
chai.use(chaiAsPromised);

describe.skip('CanDeploy Spec', () => {
(process.env['SKIP_STANDALONE'] === "true" ? describe.skip : describe )('CanDeploy Spec', () => {
const PORT = Math.floor(Math.random() * 999) + 9000;
let server: http.Server;
let absolutePath: string;
Expand Down
2 changes: 1 addition & 1 deletion src/message.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import messageFactory from './message';
const { expect } = chai;
chai.use(chaiAsPromised);

describe.skip('Message Spec', () => {
(process.env['SKIP_STANDALONE'] === "true" ? describe.skip : describe )('Message Spec', () => {
const validJSON = `{ "description": "a test mesage", "content": { "name": "Mary" } }`;

let absolutePath: string;
Expand Down
2 changes: 1 addition & 1 deletion src/pact-standalone.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { expect } = chai;
const basePath = pactEnvironment.cwd;

// Needs to stay a function and not an arrow function to access mocha 'this' context
describe.skip('Pact Standalone', function forMocha() {
(process.env['SKIP_STANDALONE'] === "true" ? describe.skip : describe )('Pact Standalone', function forMocha() {
// Set timeout to 10 minutes because downloading binaries might take a while.
this.timeout(600000);

Expand Down
2 changes: 1 addition & 1 deletion src/pact.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ServerOptions } from '.';
const { expect } = chai;
chai.use(chaiAsPromised);

describe.skip('Pact Spec', () => {
(process.env['SKIP_STANDALONE'] === "true" ? describe.skip : describe )('Pact Spec', () => {
afterEach(() => pact.removeAllServers());

describe('Set Log Level', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/publisher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { PublisherOptions } from './types';
const { expect } = chai;
chai.use(chaiAsPromised);

describe.skip('Publish Spec', () => {
(process.env['SKIP_STANDALONE'] === "true" ? describe.skip : describe )('Publish Spec', () => {
const PORT = Math.floor(Math.random() * 999) + 9000;
const pactFile = path.resolve(
__dirname,
Expand Down
2 changes: 1 addition & 1 deletion src/server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ chai.use(chaiAsPromised);
const { expect } = chai;
const rm = util.promisify(rimraf);

describe.skip('Server Spec', () => {
(process.env['SKIP_STANDALONE'] === "true" ? describe.skip : describe )('Server Spec', () => {
let server: any;
const monkeypatchFile: string = path.resolve(
__dirname,
Expand Down
2 changes: 1 addition & 1 deletion src/stub.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import stubFactory from './stub';
chai.use(chaiAsPromised);
const { expect } = chai;

describe.skip('Stub Spec', () => {
(process.env['SKIP_STANDALONE'] === "true" ? describe.skip : describe )('Stub Spec', () => {
let stub: any;
const validDefaults = {
pactUrls: [
Expand Down
2 changes: 1 addition & 1 deletion standalone/install.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chalk = require('chalk');

// Get latest version from https://github.com/pact-foundation/pact-ruby-standalone/releases
export const PACT_STANDALONE_VERSION = '2.4.0';
export const PACT_STANDALONE_VERSION = '2.3.1';

function makeError(msg: string): Error {
return new Error(chalk.red(`Error while locating pact binary: ${msg}`));
Expand Down
2 changes: 1 addition & 1 deletion test/publisher.integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import brokerMock from './integration/broker-mock';
const { expect } = chai;
chai.use(chaiAsPromised);

describe.skip('Publish Spec', () => {
(process.env['SKIP_STANDALONE'] === "true" ? describe.skip : describe )('Publish Spec', () => {
let server: http.Server;
const PORT = Math.floor(Math.random() * 999) + 9000;
const pactBrokerBaseUrl = `http://localhost:${PORT}`;
Expand Down

0 comments on commit 554968f

Please sign in to comment.