Post test-without-fix results as PR comment (#8269) #43982
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a basic workflow to help you get started with Actions | |
| name: CI | |
| # 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] | |
| pull_request: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # https://stackoverflow.com/a/72408109/3443137 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| # For a lower total time | |
| # the jobs which take longes must come before the faster ones | |
| # because github will start them likely earlier | |
| jobs: | |
| core: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: log versions | |
| run: | | |
| node --version | |
| npm -v | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| key: ${{ runner.os }}-npm-core-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-core-x4- | |
| - name: install npm dependencies | |
| run: npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| - name: build | |
| run: npm run build | |
| - name: test:typings | |
| run: npm run test:typings | |
| # We have to run all major scripts once on windows to ensure windows-devs can | |
| # run the test suite. | |
| windows: | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: log versions | |
| run: | | |
| node --version | |
| npm -v | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| key: ${{ runner.os }}-npm-windows-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-windows-x4- | |
| - name: install npm dependencies | |
| run: npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| - run: npm run build | |
| - run: npm run test:node:memory | |
| storage-localstorage: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| key: ${{ runner.os }}-npm-storage-localstorage-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-storage-localstorage-x4- | |
| - run: npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| - run: npm run build | |
| - run: npm run test:node:localstorage | |
| storage-dexie: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| key: ${{ runner.os }}-npm-storage-dexie-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-storage-dexie-x4- | |
| - name: install npm dependencies | |
| run: npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| - name: build | |
| run: npm run build | |
| - run: npm run test:node:dexie | |
| - run: npm run test:fast:dexie | |
| - name: npm run test:browser:dexie | |
| uses: coactions/setup-xvfb@v1 | |
| with: | |
| run: npm run test:browser:dexie | |
| storage-memory: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| key: ${{ runner.os }}-npm-memory-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-memory-x4- | |
| - run: npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| - run: npm run build | |
| - run: npm run test:node:memory | |
| - run: npm run test:fast:memory | |
| - name: npm run test:browser:memory | |
| uses: coactions/setup-xvfb@v1 | |
| with: | |
| run: npm run test:browser:memory | |
| - run: timeout 30m bash -lc "until npm run test:fast:memory-random-delay; do sleep 5; done" | |
| - name: node example | |
| working-directory: ./examples/node | |
| run: | | |
| npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| npm run test | |
| storage-remote: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| key: ${{ runner.os }}-npm-remote-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-remote-x4- | |
| - name: install npm dependencies | |
| run: npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| - name: build | |
| run: npm run build | |
| - run: npm run test:node:remote | |
| - name: npm run test:browser:remote | |
| uses: coactions/setup-xvfb@v1 | |
| with: | |
| run: npm run test:browser:remote | |
| storage-foundationdb: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder and docker layers | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| /tmp/.buildx-cache | |
| key: ${{ runner.os }}-npm-storage-foundationdb-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-storage-foundationdb-x4- | |
| - name: pre-pull foundationdb docker images | |
| # ensure it has downloaded the image | |
| run: | | |
| docker pull foundationdb/foundationdb:7.3.59 | |
| - name: install FoundationDB client | |
| working-directory: ./scripts | |
| run: sh install-foundationdb.sh | |
| - name: Start FoundationDB Docker container | |
| run: sh ./scripts/start-foundationdb-docker.sh | |
| - name: install npm dependencies | |
| run: npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| - run: npm install foundationdb@2.0.1 || (sleep 15 && npm install foundationdb@2.0.1) || (sleep 15 && npm install foundationdb@2.0.1) | |
| - name: build | |
| run: npm run build | |
| # Run them twice to ensure no test has persistence | |
| - run: npm run test:node:foundationdb | |
| - run: npm run test:node:foundationdb | |
| - run: npm run test:fast:foundationdb | |
| storage-sqlite-trial: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| key: ${{ runner.os }}-npm-storage-sqlite-trial-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-storage-sqlite-trial-x4- | |
| - run: npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| - run: npm run build | |
| - run: npm run test:node:sqlite-trial | |
| storage-mongodb: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| key: ${{ runner.os }}-npm-storage-mongodb-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-storage-mongodb-x4- | |
| - name: Start MongoDB | |
| uses: supercharge/mongodb-github-action@1.12.1 | |
| with: | |
| mongodb-version: 8.0.4 | |
| mongodb-replica-set: rs0 | |
| - name: install npm dependencies | |
| run: npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| - run: npm run build | |
| - run: node ./config/mongodb-connection-tester.js | |
| - run: npm run test:node:mongodb | |
| - run: npm run test:fast:mongodb | |
| - run: timeout 30m bash -c 'until npm run test:replication-mongodb; do sleep 15; done' | |
| example-angular: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Chrome to specific version | |
| id: chrome | |
| uses: browser-actions/setup-chrome@v2 | |
| with: | |
| chrome-version: 141 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| ./examples/angular/node_modules | |
| # invalidate cache when any package.json changes | |
| key: ${{ runner.os }}-npm-angular-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-angular-x4- | |
| - name: prepare RxDB core | |
| run: | | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| rm -r node_modules | |
| - name: angular build | |
| working-directory: ./examples/angular | |
| run: | | |
| sh reinstall.sh | |
| npm run lint | |
| npm run build | |
| - name: angular test | |
| # uses: DevExpress/testcafe-action@latest | |
| uses: coactions/setup-xvfb@v1 | |
| env: | |
| BROWSER_PATH: ${{ steps.chrome.outputs.chrome-path }} | |
| with: | |
| working-directory: ./examples/angular | |
| run: bash -c "npm run test:build || npm run test:build || npm run test:build" | |
| - name: angular test ssr | |
| working-directory: ./examples/angular | |
| run: npm run test:ssr | |
| - name: Capacitor build | |
| working-directory: ./examples/angular | |
| run: npm run build:capacitor | |
| test-builds: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| ./docs-src/node_modules | |
| key: ${{ runner.os }}-npm-test-builds-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-test-builds-x4- | |
| - name: prepare RxDB core | |
| run: | | |
| npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| npm run build | |
| - name: measure build size | |
| run: npm run build:size | |
| - run: npm run build:rollup | |
| - name: check for em-dashes | |
| run: node ./scripts/check-em-dashes.js | |
| - name: check code block line length | |
| run: node ./scripts/check-code-block-line-length.js | |
| - name: npm run docs:build | |
| run: | | |
| npm -v | |
| (cd docs-src && (npm install || (sleep 15 && npm install) || (sleep 15 && npm install))) | |
| npm run docs:build | |
| test-code-style: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Validate workflow YAML syntax | |
| run: | | |
| python3 -c " | |
| import yaml, glob, sys | |
| errors = 0 | |
| for f in sorted(glob.glob('.github/workflows/*.yml')): | |
| try: | |
| with open(f) as fh: | |
| yaml.safe_load(fh) | |
| print(f'{f}: OK') | |
| except yaml.YAMLError as e: | |
| print(f'{f}: FAIL') | |
| print(e) | |
| errors += 1 | |
| sys.exit(1 if errors else 0) | |
| " | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| key: ${{ runner.os }}-npm-test-code-style-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-test-code-style-x4- | |
| - name: spelling readme | |
| uses: codespell-project/actions-codespell@v2.2 | |
| with: | |
| ignore_words_file: config/codespellignore.txt | |
| path: README.md | |
| - name: spelling src | |
| uses: codespell-project/actions-codespell@v2.2 | |
| with: | |
| ignore_words_file: config/codespellignore.txt | |
| path: src | |
| - name: spelling docs-src/docs | |
| uses: codespell-project/actions-codespell@v2.2 | |
| with: | |
| ignore_words_file: config/codespellignore.txt | |
| path: docs-src/docs | |
| - name: spelling docs-src/src | |
| uses: codespell-project/actions-codespell@v2.2 | |
| with: | |
| ignore_words_file: config/codespellignore.txt | |
| skip: legal-notice.tsx,custom.css | |
| path: docs-src/src | |
| - name: spelling docs-src/releases | |
| uses: codespell-project/actions-codespell@v2.2 | |
| with: | |
| ignore_words_file: config/codespellignore.txt | |
| path: docs-src/releases | |
| - name: spelling test | |
| uses: codespell-project/actions-codespell@v2.2 | |
| with: | |
| ignore_words_file: config/codespellignore.txt | |
| path: test | |
| - name: prepare RxDB core | |
| run: | | |
| npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| npm run build | |
| - name: test:deps | |
| run: npm run test:deps | |
| - name: test:circular | |
| run: npm run test:circular | |
| - name: lint | |
| id: lint | |
| continue-on-error: true | |
| run: npm run lint | |
| - name: Trigger Copilot to fix lint errors | |
| if: steps.lint.outcome == 'failure' && github.ref == 'refs/heads/master' | |
| uses: actions/github-script@v8 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const runUrl = `${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}`; | |
| await github.rest.issues.create({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| title: `Fix lint errors on master`, | |
| body: [ | |
| 'The linting step failed in CI on the `master` branch.', | |
| '', | |
| `See the failed run for details: ${runUrl}`, | |
| '', | |
| 'Please fix the lint errors by running `npm run lint:fix` and addressing any remaining issues.' | |
| ].join('\n'), | |
| assignees: ['copilot'] | |
| }); | |
| - name: Fail if lint failed | |
| if: steps.lint.outcome == 'failure' | |
| run: exit 1 | |
| - name: check types | |
| run: npm run check-types | |
| example-electron: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Setup Chrome to specific version | |
| id: chrome | |
| uses: browser-actions/setup-chrome@v2 | |
| with: | |
| chrome-version: 141 | |
| - name: prepare RxDB core | |
| run: | | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| - name: electron install | |
| working-directory: ./examples/electron | |
| run: | | |
| npm run preinstall | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| - name: electron test | |
| uses: coactions/setup-xvfb@v1 | |
| env: | |
| BROWSER_PATH: ${{ steps.chrome.outputs.chrome-path }} | |
| with: | |
| working-directory: ./examples/electron | |
| run: npm run test | |
| example-tauri: | |
| # See https://tauri.app/develop/tests/webdriver/ci/ for more information | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| # install system dependencies that Tauri needs to compile on Linux. | |
| # note the extra dependencies for `tauri-driver` to run which are: `webkit2gtk-driver` and `xvfb` | |
| - name: Tauri dependencies | |
| run: | | |
| sudo apt update && sudo apt install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libxdo-dev \ | |
| libssl-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| webkit2gtk-driver | |
| - name: Setup rust-toolchain stable | |
| id: rust-toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| # install the latest version of `tauri-driver`. | |
| # note: the tauri-driver version is independent of any other Tauri versions | |
| - name: Install tauri-driver | |
| run: cargo install tauri-driver --locked | |
| - name: prepare RxDB core | |
| run: | | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| - name: tauri install | |
| working-directory: ./examples/tauri | |
| run: | | |
| npm run preinstall | |
| npm install --legacy-peer-deps -D || (sleep 15 && npm install --legacy-peer-deps -D) || (sleep 15 && npm install --legacy-peer-deps -D) | |
| - name: tauri test | |
| uses: coactions/setup-xvfb@v1 | |
| with: | |
| working-directory: ./examples/tauri | |
| run: npm run test | |
| example-react: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Setup Chrome to specific version | |
| id: chrome | |
| uses: browser-actions/setup-chrome@v2 | |
| with: | |
| chrome-version: 141 | |
| - name: prepare RxDB core | |
| run: | | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| rm -r node_modules | |
| - name: react install | |
| working-directory: ./examples/react | |
| run: | | |
| npm run preinstall | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| - name: react test | |
| uses: coactions/setup-xvfb@v1 | |
| env: | |
| BROWSER_PATH: ${{ steps.chrome.outputs.chrome-path }} | |
| with: | |
| working-directory: ./examples/react | |
| run: | | |
| google-chrome --version | |
| npm run test:build | |
| example-react-native-expo: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: prepare RxDB core | |
| run: | | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| rm -rf node_modules | |
| - name: react-native test dev | |
| run: | | |
| cd ./examples/react-native | |
| npm run preinstall | |
| npm i install --legacy-peer-deps || (sleep 15 && npm i install --legacy-peer-deps) || (sleep 15 && npm i install --legacy-peer-deps) | |
| npm run test | |
| - name: react-native test bundle | |
| run: | | |
| cd ./examples/react-native | |
| echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf | |
| sudo sysctl -p | |
| npm run test:bundle | |
| example-vue: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Chrome to specific version | |
| id: chrome | |
| uses: browser-actions/setup-chrome@v2 | |
| with: | |
| chrome-version: 141 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: prepare RxDB core | |
| run: | | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| rm -r node_modules | |
| - name: vue build | |
| working-directory: ./examples/vue | |
| run: | | |
| npm run preinstall | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run lint | |
| npm run build | |
| - name: vue test | |
| uses: coactions/setup-xvfb@v1 | |
| env: | |
| BROWSER_PATH: ${{ steps.chrome.outputs.chrome-path }} | |
| with: | |
| working-directory: ./examples/vue | |
| # retry because of random CI failures on slow servers | |
| run: timeout 30m bash -lc "until npm run test; do sleep 5; done" | |
| example-svelte: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Chrome to specific version | |
| id: chrome | |
| uses: browser-actions/setup-chrome@v2 | |
| with: | |
| chrome-version: 141 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: prepare RxDB core | |
| run: | | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| rm -r node_modules | |
| - name: svelte build | |
| working-directory: ./examples/svelte | |
| run: | | |
| npm run preinstall | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| - name: svelte test | |
| uses: coactions/setup-xvfb@v1 | |
| env: | |
| BROWSER_PATH: ${{ steps.chrome.outputs.chrome-path }} | |
| with: | |
| working-directory: ./examples/svelte | |
| run: npm run test | |
| vite-vanilla-ts: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Chrome to specific version | |
| id: chrome | |
| uses: browser-actions/setup-chrome@v2 | |
| with: | |
| chrome-version: 141 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: prepare RxDB core | |
| run: | | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| rm -r node_modules | |
| - name: vite vanilla ts build | |
| working-directory: ./examples/vite-vanilla-ts | |
| run: | | |
| npm run preinstall | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| - name: vite vanilla ts test | |
| uses: coactions/setup-xvfb@v1 | |
| env: | |
| BROWSER_PATH: ${{ steps.chrome.outputs.chrome-path }} | |
| with: | |
| working-directory: ./examples/vite-vanilla-ts | |
| run: npm run test | |
| example-graphql: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Chrome to specific version | |
| id: chrome | |
| uses: browser-actions/setup-chrome@v2 | |
| with: | |
| chrome-version: 141 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: prepare RxDB core | |
| run: | | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| npm run build | |
| - name: install | |
| working-directory: ./examples/graphql | |
| run: | | |
| npm run preinstall | |
| npm install --legacy-peer-deps || (sleep 15 && npm install --legacy-peer-deps) || (sleep 15 && npm install --legacy-peer-deps) | |
| - name: build | |
| working-directory: ./examples/graphql | |
| run: npm run build | |
| - name: test test:localstorage | |
| uses: coactions/setup-xvfb@v1 | |
| env: | |
| BROWSER_PATH: ${{ steps.chrome.outputs.chrome-path }} | |
| with: | |
| working-directory: ./examples/graphql | |
| run: npm run test:localstorage | |
| # example-flutter: | |
| # runs-on: ubuntu-22.04 | |
| # timeout-minutes: 30 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Set node version | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version-file: ".nvmrc" | |
| # - uses: subosito/flutter-action@v2 | |
| # with: | |
| # flutter-version: "3.3.4" | |
| # channel: "stable" | |
| # - run: flutter --version | |
| # - name: Reuse npm cache folder | |
| # uses: actions/cache@v4 | |
| # env: | |
| # cache-name: cache-node-modules | |
| # with: | |
| # path: | | |
| # ~/.npm | |
| # ./node_modules | |
| # ./examples/flutter/javascript/node_modules | |
| # key: ${{ runner.os }}-npm-flutter-x4-${{ hashFiles('**/package.json') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-npm-flutter-x4- | |
| # - name: prepare RxDB core | |
| # run: | | |
| # npm install --legacy-peer-deps | |
| # npm run build | |
| # rm -r node_modules | |
| # - name: flutter javascript build | |
| # working-directory: ./examples/flutter/javascript | |
| # run: | | |
| # npm run preinstall | |
| # npm install --legacy-peer-deps | |
| # npm run build | |
| # - name: Add flutter linux dependencies | |
| # run: | | |
| # sudo apt-get update -y | |
| # sudo apt-get install -y ninja-build libgtk-3-dev | |
| # - name: flutter test | |
| # uses: coactions/setup-xvfb@v1 | |
| # with: | |
| # working-directory: ./examples/flutter | |
| # run: | | |
| # flutter config --enable-linux-desktop | |
| # flutter test integration_test/basics_test.dart -d linux | |
| test-tutorials: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: prepare RxDB core | |
| run: | | |
| npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| npm run build | |
| - name: test tutorials | |
| working-directory: ./test/tutorials/ | |
| run: | | |
| npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| npm test | |
| # TODO this fails randomly because it will not always know about the project after running the import | |
| # appwrite: | |
| # runs-on: ubuntu-22.04 | |
| # timeout-minutes: 30 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Set node version | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version-file: ".nvmrc" | |
| # - name: Reuse npm cache folder | |
| # uses: actions/cache@v4 | |
| # env: | |
| # cache-name: cache-node-modules | |
| # with: | |
| # path: | | |
| # ~/.npm | |
| # key: ${{ runner.os }}-npm-appwrite-x4-${{ hashFiles('**/package.json') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-npm-appwrite-x4- | |
| # - name: Cache Docker layers | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: /tmp/.buildx-cache | |
| # key: ${{ runner.os }}-buildx-appwrite-${{ github.sha }} | |
| # # We start the download while building RxDB to make the CI faster | |
| # - name: Start docker download | |
| # working-directory: ./config/appwrite/ | |
| # run: docker compose pull & | |
| # - name: prepare RxDB core | |
| # run: | | |
| # npm install | |
| # npm run build | |
| # - name: compose up | |
| # working-directory: config/appwrite | |
| # run: | | |
| # docker compose up -d | |
| # echo "Waiting for containers to become healthy..." | |
| # while [ "$(docker compose ps --format json | grep -c 'running')" -lt "$(docker compose ps -q | wc -l)" ]; do sleep 5; done | |
| # echo "Containers are now running." | |
| # docker ps -a | |
| # - name: Restore Backup | |
| # working-directory: config/appwrite | |
| # run: | | |
| # bash restore.bash | |
| # sleep 20 | |
| # - name: restart cotainers | |
| # working-directory: config/appwrite | |
| # run: | | |
| # docker compose down | |
| # docker compose up -d | |
| # echo "Waiting for containers to become healthy..." | |
| # while [ "$(docker compose ps --format json | grep -c 'running')" -lt "$(docker compose ps -q | wc -l)" ]; do sleep 5; done | |
| # echo "Containers are now running." | |
| # docker ps -a | |
| # - name: Run Appwrite Tests | |
| # uses: coactions/setup-xvfb@v1 | |
| # with: | |
| # run: npm run test:replication-appwrite | |
| test-others-replications: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| key: ${{ runner.os }}-npm-others-replications-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-others-replications-x4- | |
| - name: prepare RxDB core | |
| run: | | |
| npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| npm run build | |
| - run: npm run test:replication-google-drive | |
| - run: npm run test:replication-microsoft-onedrive | |
| # supabase | |
| - run: npm run supabase:start | |
| - run: timeout 30m bash -c 'until npm run test:replication-supabase; do sleep 5; done' | |
| - run: npm run supabase:stop | |
| - run: npm run test:replication-couchdb | |
| - name: firestore replication | |
| run: | | |
| timeout 30m bash -c 'until npm run test:replication-firestore; do sleep 15; done' | |
| - name: nats replication | |
| # first start/stop the container once to ensure it | |
| # has downloaded the image | |
| run: | | |
| docker pull nats:2.9.17 | |
| npm run test:replication-nats | |
| test-others-runtimes: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Reuse npm cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| key: ${{ runner.os }}-npm-others-runtimes-x4-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm-others-runtimes-x4- | |
| - name: prepare RxDB core | |
| run: | | |
| npm install || (sleep 15 && npm install) || (sleep 15 && npm install) | |
| npm run build | |
| # bun | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: '1.3.11' | |
| - run: npm run test:bun:memory | |
| # deno (must be last because it messes up with file permissions) | |
| - name: Reuse deno cache folder | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-deno-modules | |
| with: | |
| path: | | |
| /home/runner/.cache/deno | |
| # do not cache based on package.json because deno install randomly fails | |
| # and it would then never succeed on the first run on dependency updateds | |
| key: ${{ runner.os }}-deno-x4- | |
| - name: clear denoKV storage files | |
| run: rm -rf /home/runner/.cache/deno/location_data/* | |
| - uses: denoland/setup-deno@v1 | |
| with: | |
| # https://github.com/denoland/deno/releases | |
| deno-version: "2.6.5" | |
| - name: run deno tests:dexie | |
| run: | | |
| sudo npm i -g cross-env | |
| deno info | |
| timeout 30m bash -c 'until npm run test:deno:dexie; do sleep 5; done' | |
| - name: run deno tests:denokv | |
| run: | | |
| sudo npm i -g cross-env | |
| deno info | |
| timeout 30m bash -c 'until npm run test:deno:denokv; do sleep 5; done' |