Skip to content

Commit

Permalink
Merge branch 'staging' into update-ts-target
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Oct 15, 2021
2 parents 43dc65a + a4dac97 commit e003504
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 12 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/pr-e2e.yml
@@ -0,0 +1,46 @@
name: PR - e2e testing

on:
push:
branches:
- master
pull_request:

jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
node-version: [14.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: restore lerna
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- uses: browser-actions/setup-chrome@latest
- name: Build apps (with retries)
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
command: yarn build:ci
- name: Update webdriver (with retries)
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
command: yarn lerna run --scope altair-app webdriver-update-ci
- name: Run headless e2e test
uses: GabrielBB/xvfb-action@v1
with:
run: yarn lerna run --scope altair-app e2e:ci
10 changes: 3 additions & 7 deletions .github/workflows/pr.yml
@@ -1,4 +1,4 @@
name: PR
name: PR - testing

on:
push:
Expand Down Expand Up @@ -28,7 +28,8 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- uses: browser-actions/setup-chrome@latest
- uses: nick-invision/retry@v2
- name: Build apps (with retries)
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
Expand All @@ -37,11 +38,6 @@ jobs:
uses: GabrielBB/xvfb-action@v1
with:
run: yarn test:ci
- run: yarn lerna run --scope altair-app webdriver-update-ci;
- name: Run headless e2e test
uses: GabrielBB/xvfb-action@v1
with:
run: yarn lerna run --scope altair-app e2e:ci
# https://github.com/marketplace/actions/deployment-action
# deploy-surge:
# runs-on: ubuntu-latest
Expand Down
Expand Up @@ -29,6 +29,7 @@ import { GqlService } from '../../../services';
import getRootTypes from '../../../utils/get-root-types';
import { DocView } from 'altair-graphql-core/build/types/state/docs.interfaces';
import { AltairConfig } from 'altair-graphql-core/build/config';
import { getDocUtilsWorkerAsyncClass } from './worker-helper';

@UntilDestroy()
@Component({
Expand Down Expand Up @@ -228,7 +229,7 @@ export class DocViewerComponent implements OnChanges {
async getDocUtilsWorker() {
if (!this.docUtilWorker) {
try {
const DocUtils: any = Comlink.wrap(new Worker(new URL('../doc-utils.worker', import.meta.url), { type: 'module' }));
const DocUtils: any = getDocUtilsWorkerAsyncClass();
this.docUtilWorker = await new DocUtils();
} catch (error) {
debug.error('Could not load doc utilsweb worker');
Expand Down
@@ -0,0 +1,3 @@
import * as Comlink from 'comlink';

export const getDocUtilsWorkerAsyncClass = () => Comlink.wrap(new Worker(new URL('../doc-utils.worker', import.meta.url), { type: 'module' }));
3 changes: 3 additions & 0 deletions packages/altair-app/src/setup-jest.ts
@@ -1,4 +1,7 @@
import 'jest-preset-angular/setup-jest';
jest.mock('./app/modules/altair/components/doc-viewer/doc-viewer/worker-helper', () => ({
getDocUtilsWorkerAsyncClass: () => {},
}))

/* global mocks for jsdom */
const mock = () => {
Expand Down
1 change: 1 addition & 0 deletions packages/altair-app/tsconfig.json
Expand Up @@ -17,6 +17,7 @@
"typeRoots": [
"node_modules/@types"
],
"downlevelIteration": true,
"lib": [
"es2016",
"dom",
Expand Down
8 changes: 4 additions & 4 deletions packages/altair-app/yarn.lock
Expand Up @@ -3484,10 +3484,10 @@ alphanum-sort@^1.0.2:
resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=

altair-graphql-core@^4.0.9:
version "4.0.9"
resolved "https://registry.yarnpkg.com/altair-graphql-core/-/altair-graphql-core-4.0.9.tgz#c52fd7238bae91114f94c693646182bdf042c47e"
integrity sha512-nL6hCHRanErWaVFVJsVkDmFg1z6iegqywX0W2naovnH7LUHzNFk79lFODMLDtliKqvXa+oQQt+K97emOBpeTVQ==
altair-graphql-core@^4.0.11:
version "4.0.11"
resolved "https://registry.yarnpkg.com/altair-graphql-core/-/altair-graphql-core-4.0.11.tgz#1b8466f498a8ff65c80a2d80438b676e4bff8321"
integrity sha512-X40N49vEDft8Y/sETzGdzYl4uirfv/kQFxkOy2AFZdP32gYelxWKLdx+qDZMxPY3n92f3y5+X+Zm928gxXxI3w==
dependencies:
"@apollo/client" "^3.3.20"
actioncable "^5.2.6"
Expand Down

0 comments on commit e003504

Please sign in to comment.