Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ name: Browserstack
on:
pull_request:
types: [opened, synchronize, unlabeled]
push:
branches:
- master
- main

jobs:
build:
runs-on: ubuntu-latest
if: "${{ github.event_name != 'pull_request' || github.event.action != 'unlabeled' || github.event.label.name == 'skip: browserstack' }}"
if: "${{ github.event.action != 'unlabeled' || github.event.label.name == 'skip: browserstack' }}"

strategy:
matrix:
Expand All @@ -21,7 +17,7 @@ jobs:
- name: Check BrowserStack skip label
id: browserstack
env:
SKIP_BROWSERSTACK: "${{ github.event_name == 'pull_request' && github.event.action != 'unlabeled' && contains(github.event.pull_request.labels.*.name, 'skip: browserstack') }}"
SKIP_BROWSERSTACK: "${{ github.event.action != 'unlabeled' && contains(github.event.pull_request.labels.*.name, 'skip: browserstack') }}"
run: echo "skip=${SKIP_BROWSERSTACK}" >> "$GITHUB_OUTPUT"

- name: "BrowserStack Env Setup"
Expand Down Expand Up @@ -52,6 +48,9 @@ jobs:
- name: Run npm ci
run: sudo npm ci

- name: Test BrowserStack matrix selection
run: npm run test:matrix

- name: Prettier check (report only, no writes or commits)
if: always()
run: |
Expand All @@ -77,7 +76,7 @@ jobs:
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

- name: "Stop BrowserStackLocal"
if: steps.browserstack.outputs.skip != 'true'
if: always() && steps.browserstack.outputs.skip != 'true'
uses: "browserstack/github-actions/setup-local@master"
with:
local-testing: "stop"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The most important file of the repository is [`/src/default.js`](src/default.js)

## Device testing is sponsored by BrowserStack

We run our public script with more than [50 browsers on many different (real) devices](https://github.com/simpleanalytics/scripts/blob/main/test/helpers/get-browsers.js). We support Internet Explorer 9 (not sure who is still using that) and up. Including many mobile browsers and less common devices. We get amazing sponsorship from [BrowserStack](https://www.browserstack.com/). Thanks, BrowserStack!
We run our public script on a live, representative matrix of [browsers and real devices](https://github.com/simpleanalytics/scripts/blob/main/test/helpers/get-browsers.js). Simple Analytics supports vendor-maintained browser, OS, and device versions and continues compatibility testing for two years after published end of life. Older browser versions with more than 0.1% global usage remain covered. We get amazing sponsorship from [BrowserStack](https://www.browserstack.com/). Thanks, BrowserStack!

<img src="https://mijnimpact-adriaan-io.s3.amazonaws.com/1581763646555-browserstack-logo.png" width="300px" alt="BrowserStack Logo" />

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"build": "node compile.js",
"pretest": "npm run build -- testing",
"test": "node -r dotenv/config ./test/index.js",
"test:matrix": "mocha test/helpers/get-browsers.test.js",
"posttest": "npm run build"
},
"repository": {
Expand Down
Loading
Loading