Skip to content

Commit

Permalink
Fix full test matrix (#1750)
Browse files Browse the repository at this point in the history
* Configure pnpm to cache dependencies
* Remove test badge for now (as we're changing test service)
* Let dexie-observable and dexie-syncable have a single test each, that runs both unit- and integration tests
* Using coactions/setup-xvfb@v1 to run headless Chrome and Firefox directly on github actions
* Updating browser versions
* Removing CI of dexie-relationships
  • Loading branch information
dfahlander committed Jun 18, 2023
1 parent 8f0499c commit 0d1404b
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 177 deletions.
37 changes: 23 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Test
on: [push, workflow_dispatch]

env:
#LAMBDATEST: "true"
#LAMBDATEST: "true" # Uncomment this line to run tests on LambdaTest instead of Browserstack
GH_ACTIONS: "true"
LT_USERNAME: ${{ secrets.LT_USERNAME }}
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
Expand All @@ -15,23 +15,32 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
TF: [test]
TF:
- test
- addons/Dexie.Observable/test
- addons/Dexie.Syncable/test
- addons/dexie-export-import/test
- libs/dexie-react-hooks/test
fail-fast: true # If one test fails, abort the rest of the tests
max-parallel: 1 # At least for browserstack, this seems to be needed to avoid timeouts
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "pnpm"
- name: Install dependencies
run: |
curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
pnpm config set store-dir ~/.pnpm-store
pnpm install --no-frozen-lockfile
run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm run build
- name: Test
run: |
cd ${{ matrix.TF }}
pwd
bash ./gh-actions.sh
- name: Run headless test
uses: coactions/setup-xvfb@v1
with:
run: bash ./gh-actions.sh
working-directory: ${{ matrix.TF }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Dexie.js
========

[![NPM Version][npm-image]][npm-url] ![Build Status](https://github.com/dexie/Dexie.js/actions/workflows/main.yml/badge.svg)[![Tested with Browserstack](https://dexie.org/assets/images/tested-with-browserstack2.png)](https://www.browserstack.com)
[![NPM Version][npm-image]][npm-url] ![Build Status](https://github.com/dexie/Dexie.js/actions/workflows/main.yml/badge.svg)

Dexie.js is a wrapper library for indexedDB - the standard database in the browser. https://dexie.org

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pnpm install >/dev/null
pnpm run build
pnpm run test:typings
pnpm run test:unit
pnpm run test:integration
5 changes: 0 additions & 5 deletions addons/Dexie.Observable/test/integration/gh-actions.sh

This file was deleted.

5 changes: 0 additions & 5 deletions addons/Dexie.Observable/test/integration/travis.sh

This file was deleted.

6 changes: 0 additions & 6 deletions addons/Dexie.Observable/test/unit/travis.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash -e
cd ../../../Dexie.Observable
cd ../../Dexie.Observable
echo "Installing dependencies for dexie-observable"
pnpm install >/dev/null
echo "Building dexie-observable"
Expand All @@ -12,3 +12,4 @@ pnpm run build

pnpm run test:typings
pnpm run test:unit
pnpm run test:integration
13 changes: 0 additions & 13 deletions addons/Dexie.Syncable/test/integration/gh-actions.sh

This file was deleted.

13 changes: 0 additions & 13 deletions addons/Dexie.Syncable/test/integration/travis.sh

This file was deleted.

14 changes: 0 additions & 14 deletions addons/Dexie.Syncable/test/unit/travis.sh

This file was deleted.

13 changes: 0 additions & 13 deletions addons/dexie-export-import/test/travis.sh

This file was deleted.

6 changes: 0 additions & 6 deletions libs/dexie-react-hooks/test/travis.sh

This file was deleted.

4 changes: 0 additions & 4 deletions test/integrations/test-dexie-relationships/travis.sh

This file was deleted.

6 changes: 3 additions & 3 deletions test/karma.browsers.matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ module.exports = {
//local: ['bs_safari_latest_supported'],

// When browserstack cannot be used, use local Firefox.
ciLocal: ['Firefox'],
ciLocal: ['Chrome'],

// Continous Integration on every push to master
ci: [
// - Let firefox represent the standard evergreen browser.
// Leaving out Chrome, since local tests have hopefully already run on it.
// Chrome will be tested in the pre_npm_publish anyway.
'bs_firefox_latest_supported',
'Firefox',
// Safari. Enforces native Safari support for every PR!
'bs_safari_latest_supported'
],
Expand All @@ -32,7 +32,7 @@ module.exports = {
// Skipping under 4.0 alpha: 'bs_chrome_oldest_supported', // ...because not tested in CI!
'bs_chrome_latest_supported', // ...because not tested in CI!
//'Skipping under 4.0 alpha: bs_firefox_oldest_supported', // ...because not tested in CI!
"bs_safari_latest_supported", // ...because not tested in CI!
"bs_firefox_latest_supported", // ...because not tested in CI!
]
}

20 changes: 3 additions & 17 deletions test/karma.browserstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
bs_firefox_latest_supported: {
base: 'BrowserStack',
browser: 'firefox',
browser_version: '113',
browser_version: '114',
os: 'Windows',
os_version: 10
},
Expand All @@ -20,17 +20,10 @@ module.exports = {
os: 'OS X',
os_version: 'El Capitan'
},
bs_edge_oldest_supported: {
base: 'BrowserStack',
browser: "Edge",
browser_version: '15',
os: 'Windows',
os_version: '10'
},
bs_edge_latest_supported: {
base: 'BrowserStack',
browser: 'Edge',
browser_version: '95',
browser_version: '114',
os: 'Windows',
os_version: '10'
},
Expand All @@ -44,7 +37,7 @@ module.exports = {
bs_chrome_latest_supported: {
base: 'BrowserStack',
browser: "Chrome",
browser_version: "112",
browser_version: "114",
os: 'Windows',
os_version: 10
},
Expand All @@ -61,13 +54,6 @@ module.exports = {
browser_version: "16",
os: 'OS X',
os_version: 'Ventura'
},
bs_iphone7: {
base: 'BrowserStack',
browser: "Safari",
browser_version: "10.1",
os: 'iOS',
os_version: "10.3"
}
}
}
3 changes: 0 additions & 3 deletions test/travis.sh

This file was deleted.

59 changes: 0 additions & 59 deletions tools/travis.sh

This file was deleted.

0 comments on commit 0d1404b

Please sign in to comment.