Skip to content

Commit

Permalink
core(test): add initial WebdriverIO infrastructure
Browse files Browse the repository at this point in the history
STENCIL-1190
  • Loading branch information
christian-bromann committed Mar 11, 2024
1 parent 7a70281 commit 6d17f26
Show file tree
Hide file tree
Showing 75 changed files with 13,361 additions and 7,636 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/test-wdio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: BrowserStack Tests

on:
merge_group:
pull_request_target:
branches:
- 'main'
push:
branches:
- 'main'

permissions: read-all

jobs:
build_core:
name: Build
uses: ./.github/workflows/build.yml

run_browserstack:
name: Run WebdriverIO Component Tests
runs-on: ubuntu-22.04
needs: [build_core]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.number) || '' }}
persist-credentials: false

- name: Use Node Version from Volta (Karma)
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
# pull the version to use from the volta key in package.json
node-version-file: './test/karma/package.json'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: stencil-core
path: .
filename: stencil-core-build.zip

- name: Run WebdriverIO Component Tests
run: npm run test.wdio

- name: Check Git Context
uses: ./.github/workflows/actions/check-git-context
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
"test.jest": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
"test.karma": "cd test/karma && npm ci && npm run karma",
"test.karma.prod": "cd test/karma && npm ci && npm run karma.prod",
"test.wdio": "cd test/wdio && npm ci && npm run test",
"test.wdio.testOnly": "cd test/wdio && npm ci && npm run wdio",
"test.prod": "npm run test.dist && npm run test.end-to-end && npm run test.jest && npm run test.karma && npm run test.sys.node && npm run test.testing && npm run test.analysis",
"test.testing": "node scripts/test/validate-testing.js",
"test.watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch",
Expand Down
Loading

0 comments on commit 6d17f26

Please sign in to comment.