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
39 changes: 27 additions & 12 deletions .github/workflows/browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Browserstack

on:
pull_request:
types: [opened, synchronize]
types: [opened, synchronize, unlabeled]
push:
branches:
- master
Expand All @@ -11,48 +11,62 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: "${{ github.event_name != 'pull_request' || github.event.action != 'unlabeled' || github.event.label.name == 'skip: browserstack' }}"

strategy:
matrix:
node-version: [16.16]

steps:
- 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') }}"
Comment thread
adriaandotcom marked this conversation as resolved.
run: echo "skip=${SKIP_BROWSERSTACK}" >> "$GITHUB_OUTPUT"

- name: "BrowserStack Env Setup"
if: steps.browserstack.outputs.skip != 'true'
uses: "browserstack/github-actions/setup-env@master"
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

- name: "Start BrowserStackLocal Tunnel"
if: steps.browserstack.outputs.skip != 'true'
uses: "browserstack/github-actions/setup-local@master"
with:
local-testing: "start"
local-logging-level: "all-logs"
local-identifier: "random"

- uses: actions/checkout@v3
- uses: actions/checkout@v7
with:
ref: ${{ github.head_ref }}
set-safe-directory: "/github/workspace"

- name: Prettier Action on PR
uses: creyD/prettier_action@v4.3
with:
prettier_options: "--write {**/*,*}.{js,hbs,html,json,md,yml,css,scss} !.github/workflows/**/* !dist/**/*"
commit_message: "Run prettier via GitHub Action"
file_pattern: "."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}

- name: Run npm ci
run: sudo npm ci

- name: Prettier check (report only, no writes or commits)
if: always()
run: |
{
echo "## Prettier formatting report"
echo ""
echo "CI does not write or commit formatting changes. Run \`npx prettier --write .\` locally to apply anything listed below."
echo ""
echo '```'
npx prettier --check . 2>&1 || true
echo '```'
} >> "$GITHUB_STEP_SUMMARY"

- name: Run npm test with BrowserStack Local
if: steps.browserstack.outputs.skip != 'true'
run: npm run build && node ./test/index.js
env:
CI: true
Expand All @@ -63,6 +77,7 @@ jobs:
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

- name: "Stop BrowserStackLocal"
if: steps.browserstack.outputs.skip != 'true'
uses: "browserstack/github-actions/setup-local@master"
with:
local-testing: "stop"
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"trailingComma": "es5"
}
4 changes: 2 additions & 2 deletions dist/latest/auto-events.js

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

2 changes: 1 addition & 1 deletion dist/latest/auto-events.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/latest/cloudflare.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Simple Analytics - Privacy friendly analytics (docs.simpleanalytics.com/script; 2023-05-03; 0dec; v11) */
/* Simple Analytics - Privacy friendly analytics (docs.simpleanalytics.com/script; 2026-06-25; 0dec; v11) */
/* eslint-env browser */

(function (
Expand Down
2 changes: 1 addition & 1 deletion dist/latest/custom/app.js

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

Loading
Loading