Skip to content

Commit

Permalink
Fixing the tests to run on LambdaTest via Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mukesh-lt committed Jun 20, 2023
1 parent 0d1404b commit 626b94d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Build and Test
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 }}
LT_TUNNEL_NAME: $(date +'%m-%dT%H:%M:%S')
BROWSER_STACK_USERNAME: ${{ secrets.BROWSER_STACK_USERNAME }}
BROWSER_STACK_ACCESS_KEY: ${{ secrets.BROWSER_STACK_ACCESS_KEY }}

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,6 @@ samples/typescript/utils.js.map
/.ntvs_analysis.dat
/*.njsproj
libs/dexie-cloud-common/tsconfig.tsbuildinfo

#lambdatest tunnel binary
.lambdatest
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"test:unit": "karma start test/karma.conf.js --single-run",
"test:typings": "tsc -p test/typings-test/",
"test:debug": "karma start test/karma.conf.js --log-level debug",
"test:ltcloud": "cross-env LAMBDATEST=true npm run test:ltTunnel & sleep 10 && npm run test:unit",
"test:ltcloud": "cross-env LAMBDATEST=true pnpm run test:ltTunnel & sleep 10 && pnpm run test:unit",
"test:ltTunnel": "node test/lt-local"
},
"just-build": {
Expand Down Expand Up @@ -119,6 +119,7 @@
"homepage": "https://dexie.org",
"devDependencies": {
"@lambdatest/node-tunnel": "^4.0.1",
"cross-env": "^7.0.3",
"dts-bundle-generator": "^5.9.0",
"just-build": "^0.9.24",
"karma": "^6.1.1",
Expand Down
13 changes: 12 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/gh-actions.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash -e
pnpm run test:typings
pnpm run test:unit
pnpm run test:ltcloud

0 comments on commit 626b94d

Please sign in to comment.