Skip to content

Commit

Permalink
ci: Update BrowserStack test config
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Feb 25, 2024
1 parent 8d8cfb7 commit 2dc9ed1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,32 @@ jobs:
with: { submodules: true }
- uses: actions/setup-node@v4
with: { node-version: 20 }
- name: Cache BrowserStackLocal
uses: actions/cache@v4
- uses: browserstack/github-actions/setup-env@master
with:
path: ~/.browserstack
key: bsl-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
bsl-${{ runner.os }}-
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
project-name: yaml
- uses: browserstack/github-actions/setup-local@master
with:
local-testing: start
local-identifier: random

- run: npm ci
- run: npm run build:browser
- name: Playground setup
working-directory: ./playground
run: npm ci
- name: Playground build
working-directory: ./playground
run: npx webpack --mode development

- run: npx http-server dist/ &
working-directory: ./playground

- name: Run tests on BrowserStack
- run: npx browserstack-node-sdk jest test/test-suite.js
working-directory: ./playground
run: npm test
env:
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}

- uses: browserstack/github-actions/setup-local@master
if: always()
with:
local-testing: stop

0 comments on commit 2dc9ed1

Please sign in to comment.