feat: faster builds through concurrency (#634)

This commit is contained in:
Eli Bosley
2023-05-01 14:30:26 -04:00
committed by GitHub
parent 2011cf453d
commit a91732959b
3 changed files with 8 additions and 9 deletions

View File

@@ -107,7 +107,6 @@ jobs:
run:
working-directory: api
runs-on: ubuntu-latest
needs: [lint-api, test-api]
outputs:
API_VERSION: ${{ steps.build-pack-binary.outputs.API_VERSION }}
@@ -162,11 +161,11 @@ jobs:
path: ${{ github.workspace }}/api/deploy/release/*.tgz
build-plugin:
needs: [lint-api, test-api, build-api]
defaults:
run:
working-directory: plugin
runs-on: ubuntu-latest
needs: [build-api]
steps:
- name: Set Timezone
uses: szenius/set-timezone@v1.2

View File

@@ -92,7 +92,6 @@ jobs:
run:
working-directory: api
runs-on: ubuntu-latest
needs: [lint-api, test-api]
outputs:
API_VERSION: ${{ steps.build-pack-binary.outputs.API_VERSION }}
@@ -158,7 +157,7 @@ jobs:
run:
working-directory: plugin
runs-on: ubuntu-latest
needs: [build-api]
needs: [lint-api, test-api, build-api]
steps:
- name: Set Timezone
uses: szenius/set-timezone@v1.2

View File

@@ -5,9 +5,7 @@ import {
split,
} from '@apollo/client/core/core.cjs';
import { onError } from '@apollo/client/link/error';
import {
getInternalApiAddress,
} from '@app/consts';
import { getInternalApiAddress } from '@app/consts';
import WebSocket from 'ws';
import { fetch } from 'cross-fetch';
import { getMainDefinition } from '@apollo/client/utilities';
@@ -27,11 +25,14 @@ const getWebsocketWithHeaders = () => {
});
}
};
}
};
export const getApiApolloClient = ({ upcApiKey }: { upcApiKey: string }) => {
const nginxPort = getters?.emhttp()?.nginx?.httpPort ?? 80;
graphqlLogger.debug('Internal GraphQL URL: %s', getInternalApiAddress(true, nginxPort));
graphqlLogger.debug(
'Internal GraphQL URL: %s',
getInternalApiAddress(true, nginxPort)
);
const httpLink = new HttpLink({
uri: getInternalApiAddress(true, nginxPort),
fetch,