Skip to content

Commit 3fb3495

Browse files
committed
Merge branch 'v12' into v12-b
2 parents e717409 + cda1d7d commit 3fb3495

File tree

17 files changed

+1295
-113
lines changed

17 files changed

+1295
-113
lines changed

.github/workflows/browserstack.yml

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,40 @@ on:
99
- main
1010

1111
jobs:
12-
build:
12+
unit-tests:
1313
runs-on: ubuntu-latest
1414

1515
strategy:
1616
matrix:
17-
node-version: [16.16]
17+
node-version: [22.16]
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
27+
- name: Run npm ci
28+
run: npm ci
29+
30+
- name: Build project
31+
run: npm run build
32+
33+
- name: Run unit tests
34+
run: npm run test:unit
35+
env:
36+
CI: true
37+
NODE_ENV: test
38+
39+
browserstack:
40+
runs-on: ubuntu-latest
41+
needs: unit-tests
42+
43+
strategy:
44+
matrix:
45+
node-version: [22.16]
1846

1947
steps:
2048
- name: "BrowserStack Env Setup"
@@ -30,13 +58,10 @@ jobs:
3058
local-logging-level: "all-logs"
3159
local-identifier: "random"
3260

33-
- uses: actions/checkout@v3
34-
with:
35-
ref: ${{ github.head_ref }}
36-
set-safe-directory: "/github/workspace"
61+
- uses: actions/checkout@v4
3762

3863
- name: Prettier Action on PR
39-
uses: creyD/prettier_action@v4.3
64+
uses: creyD/prettier_action@v4.5
4065
with:
4166
prettier_options: "--write {**/*,*}.{js,hbs,html,json,md,yml,css,scss} !.github/workflows/**/* !dist/**/*"
4267
commit_message: "Run prettier via GitHub Action"
@@ -45,15 +70,18 @@ jobs:
4570
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4671

4772
- name: Use Node.js ${{ matrix.node-version }}
48-
uses: actions/setup-node@v1
73+
uses: actions/setup-node@v4
4974
with:
5075
node-version: ${{ matrix.node-version }}
5176

5277
- name: Run npm ci
53-
run: sudo npm ci
78+
run: npm ci
79+
80+
- name: Build project
81+
run: npm run build
5482

55-
- name: Run npm test with BrowserStack Local
56-
run: npm run build && node ./test/index.js
83+
- name: Run BrowserStack tests
84+
run: node ./test/index.js
5785
env:
5886
CI: true
5987
NODE_ENV: test

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.16
1+
22.16

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ Just run `npm run watch` and every file will be validated and compiled on save.
2828

2929
The most important file of the repository is [`/src/default.js`](src/default.js)
3030

31+
## Unit tests
32+
33+
Run `npm run test:unit` to execute a small set of tests without BrowserStack.
34+
3135
## Device testing is sponsored by BrowserStack
3236

3337
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!

0 commit comments

Comments
 (0)