Skip to content

Commit

Permalink
Added gh-actions for 3x (#1751)
Browse files Browse the repository at this point in the history
* Added gh-actions for 3x
  • Loading branch information
dfahlander authored Feb 8, 2024
1 parent 74891ca commit 5966dfd
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 412 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and Test 3x

on: [push, workflow_dispatch]

env:
#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 }}
BROWSER_STACK_USERNAME: ${{ secrets.BROWSER_STACK_USERNAME }}
BROWSER_STACK_ACCESS_KEY: ${{ secrets.BROWSER_STACK_ACCESS_KEY }}
RUNNER_OS: ${{ vars.RUNNER_OS }}

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04] # [ubuntu-22.04, macos-13] # macos doesnt succeed to run safari
TF:
- test
- addons/Dexie.Observable/test/unit
- addons/Dexie.Observable/test/integration
- addons/Dexie.Syncable/test/unit
- addons/Dexie.Syncable/test/integration
- 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@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Run headless test
uses: coactions/setup-xvfb@v1
with:
run: bash ./travis.sh
working-directory: ${{ matrix.TF }}
2 changes: 1 addition & 1 deletion addons/Dexie.Observable/test/integration/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {karmaCommon, getKarmaConfig, defaultBrowserMatrix} = require('../../../..
module.exports = function (config) {
const browserMatrixOverrides = {
// Be fine with testing on local travis firefox + browserstack chrome, latest supported.
ci: ["Firefox", "bs_chrome_latest_supported"],
//ci: ["Firefox", "bs_chrome_latest_supported"],
// Safari fails to reply on browserstack. Need to not have it here.
// Just complement with old chrome browser that is not part of CI test suite.
pre_npm_publish: [
Expand Down
2 changes: 1 addition & 1 deletion addons/Dexie.Observable/test/unit/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {karmaCommon, getKarmaConfig, defaultBrowserMatrix} = require('../../../..
module.exports = function (config) {
const browserMatrixOverrides = {
// Be fine with testing on local travis firefox + browserstack chrome, latest supported.
ci: ["Firefox", "bs_chrome_latest_supported"],
//ci: ["Firefox", "bs_chrome_latest_supported"],
// Safari fails to reply on browserstack. Need to not have it here.
// Just complement with old chrome browser that is not part of CI test suite.
pre_npm_publish: [
Expand Down
2 changes: 1 addition & 1 deletion addons/Dexie.Syncable/test/integration/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {karmaCommon, getKarmaConfig, defaultBrowserMatrix} = require('../../../..
module.exports = function (config) {
const browserMatrixOverrides = {
// Be fine with testing on local travis firefox + browserstack chrome, latest supported.
ci: ["Firefox", "bs_chrome_latest_supported"],
//ci: ["Firefox", "bs_chrome_latest_supported"],
// Safari fails to reply on browserstack. Need to not have it here.
// Just complement with old chrome browser that is not part of CI test suite.
pre_npm_publish: [
Expand Down
2 changes: 1 addition & 1 deletion addons/Dexie.Syncable/test/unit/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {karmaCommon, getKarmaConfig, defaultBrowserMatrix} = require('../../../..
module.exports = function (config) {
const browserMatrixOverrides = {
// Be fine with testing on local travis firefox + browserstack chrome, latest supported.
ci: ["Firefox", "bs_chrome_latest_supported"],
//ci: ["Firefox", "bs_chrome_latest_supported"],
// Safari fails to reply on browserstack. Need to not have it here.
// Just complement with old chrome browser that is not part of CI test suite.
pre_npm_publish: [
Expand Down
2 changes: 1 addition & 1 deletion addons/dexie-export-import/test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {karmaCommon, getKarmaConfig, defaultBrowserMatrix} = require('../../../te
module.exports = function (config) {
const cfg = getKarmaConfig({
// Be fine with testing on local travis firefox + browserstack chrome, latest supported.
ci: ["Firefox", "bs_chrome_latest_supported"],
//ci: ["Firefox", "bs_chrome_latest_supported"],
// Safari fails to reply on browserstack. Need to not have it here.
// Just complement with old chrome browser that is not part of CI test suite.
pre_npm_publish: [
Expand Down
Loading

0 comments on commit 5966dfd

Please sign in to comment.