Skip to content

Commit

Permalink
FIX build
Browse files Browse the repository at this point in the history
  • Loading branch information
pubkey committed Mar 27, 2023
1 parent 2e6e65c commit b5eaa78
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 47 deletions.
85 changes: 39 additions & 46 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

name: CI

# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
branches: [master]
pull_request:

# Allows you to run this workflow manually from the Actions tab
Expand All @@ -16,15 +16,14 @@ on:
# the jobs which take longes must come before the faster ones
# because github will start them likely earlier
jobs:

core:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Reuse npm cache folder
uses: actions/cache@v3
Expand All @@ -40,10 +39,10 @@ jobs:
- name: install npm dependencies
run: npm install

- name: build
run: npm run build

- name: test:typings
run: npm run test:typings

Expand All @@ -55,7 +54,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Reuse npm cache folder
uses: actions/cache@v3
Expand All @@ -71,7 +70,7 @@ jobs:
- name: install npm dependencies
run: npm install

- name: build
run: npm run build

Expand Down Expand Up @@ -99,7 +98,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Reuse npm cache folder
uses: actions/cache@v3
Expand All @@ -115,7 +114,7 @@ jobs:
- name: install npm dependencies
run: npm install

- name: build
run: npm run build

Expand Down Expand Up @@ -146,15 +145,14 @@ jobs:
npm install
npm run test
storage-remote:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Reuse npm cache folder
uses: actions/cache@v3
Expand All @@ -170,7 +168,7 @@ jobs:
- name: install npm dependencies
run: npm install

- name: build
run: npm run build

Expand All @@ -188,7 +186,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Reuse npm cache folder
uses: actions/cache@v3
Expand All @@ -204,7 +202,7 @@ jobs:
- name: install npm dependencies
run: npm install

- name: build
run: npm run build

Expand All @@ -227,15 +225,14 @@ jobs:
with:
run: npm run test:performance:dexie


storage-foundationdb:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Reuse npm cache folder
uses: actions/cache@v3
Expand All @@ -257,7 +254,7 @@ jobs:
run: npm install

- run: npm install foundationdb@1.1.3

- name: build
run: npm run build

Expand All @@ -277,7 +274,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Reuse npm cache folder
uses: actions/cache@v3
Expand Down Expand Up @@ -318,7 +315,6 @@ jobs:
working-directory: ./examples/angular
run: npm run test:ssr


- name: Capacitor build
working-directory: ./examples/angular
run: npm run build:capacitor
Expand All @@ -330,7 +326,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Reuse npm cache folder
uses: actions/cache@v3
Expand All @@ -351,10 +347,11 @@ jobs:
- name: measure build size
run: npm run build:size

- name: test rollup build
run: npm run build:rollup

- run: npm run docs:landingpage:build

test-code-style:
runs-on: ubuntu-20.04
Expand All @@ -363,7 +360,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Reuse npm cache folder
uses: actions/cache@v3
Expand Down Expand Up @@ -426,7 +423,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: install dependencies
run: sudo apt-get update && sudo apt-get install -y chromium-browser
Expand Down Expand Up @@ -454,7 +451,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: install dependencies
run: sudo apt-get update && sudo apt-get install -y chromium-browser
- name: prepare RxDB core
Expand Down Expand Up @@ -482,8 +479,8 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
# TODO using latest node version does not work with expo-cli https://github.com/expo/expo-cli/issues/4478
node-version: 16.16.0
# TODO using latest node version does not work with expo-cli https://github.com/expo/expo-cli/issues/4478
node-version: 16.16.0

- name: prepare RxDB core
run: |
Expand All @@ -500,15 +497,14 @@ jobs:
sudo sysctl -p
yarn test:bundle
example-supabase:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Reuse npm cache folder
uses: actions/cache@v3
env:
Expand Down Expand Up @@ -567,7 +563,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: prepare RxDB core
run: |
npm install --legacy-peer-deps
Expand All @@ -580,7 +576,7 @@ jobs:
npm install --legacy-peer-deps
npm run lint
npm run build
- name: vue test
uses: GabrielBB/xvfb-action@v1
with:
Expand All @@ -596,7 +592,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: prepare RxDB core
run: |
npm install --legacy-peer-deps
Expand All @@ -608,7 +604,7 @@ jobs:
npm run preinstall
npm install --legacy-peer-deps
npm run build
- name: svelte test
uses: GabrielBB/xvfb-action@v1
with:
Expand All @@ -624,7 +620,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: prepare RxDB core
run: |
npm install --legacy-peer-deps
Expand All @@ -641,7 +637,7 @@ jobs:
with:
working-directory: ./examples/vite-vanilla-ts
run: npm run test

example-graphql:
runs-on: ubuntu-20.04
steps:
Expand All @@ -651,7 +647,7 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: prepare RxDB core
run: |
npm install --legacy-peer-deps
Expand Down Expand Up @@ -683,11 +679,11 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.3.4'
channel: 'stable'
flutter-version: "3.3.4"
channel: "stable"
- run: flutter --version
- name: Reuse npm cache folder
uses: actions/cache@v3
Expand Down Expand Up @@ -724,15 +720,14 @@ jobs:
flutter config --enable-linux-desktop
flutter test integration_test/basics_test.dart -d linux
test-tutorials:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: prepare RxDB core
run: |
npm install
Expand All @@ -750,18 +745,16 @@ jobs:
- name: Set node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: prepare RxDB core
run: |
npm install
npm run build
# in the past we had tests that failed randomly
# to prevent this we run the tests in fast-mode 10 times
# in the past we had tests that failed randomly
# to prevent this we run the tests in fast-mode 10 times
- name: unit tests 10 times
run: for i in `seq 10`; do npm run test:fast:lokijs; done



# I found out that people are stupid and use the npm downloads count
# to measure the quality of an open source project.
# But this is a bad metric so I destroy it by obfuscating the actual download count.
Expand Down
2 changes: 1 addition & 1 deletion src/rx-document-prototype-merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function getRxDocumentConstructor<RxDocType, ORM>(
) {
if (!constructorForCollection.has(rxCollection)) {
const ret = createRxDocumentConstructor(
getDocumentPrototype(rxCollection)
getDocumentPrototype(rxCollection as any)
);
constructorForCollection.set(rxCollection, ret);
}
Expand Down

0 comments on commit b5eaa78

Please sign in to comment.