-
Notifications
You must be signed in to change notification settings - Fork 19
48 lines (44 loc) · 1.47 KB
/
browser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: sdk/browser
on:
push:
branches: [main, 'feat/**']
paths-ignore:
- '**.md' #Do not need to run CI for markdown changes.
pull_request:
branches: [main, 'feat/**']
paths-ignore:
- '**.md'
jobs:
build-test-browser:
permissions:
pull-requests: write
runs-on: ubuntu-latest
strategy:
matrix:
# Node versions to run on.
version: [18, 21]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
registry-url: 'https://registry.npmjs.org'
- id: shared
name: Shared CI Steps
uses: ./actions/ci
with:
workspace_name: '@launchdarkly/js-client-sdk'
workspace_path: packages/sdk/browser
- name: Install Brotli
if: github.event_name == 'pull_request'
run: sudo apt-get update && sudo apt-get install brotli
- name: Check Package Size
if: github.event_name == 'pull_request' && matrix.version == '21'
env:
PR_NUMBER: ${{ github.event.number }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
brotli packages/sdk/browser/dist/index.js
export PR_SIZE=$(stat -c %s packages/sdk/browser/dist/index.js.br)
gh pr comment --edit-last $PR_NUMBER -b "@launchdarkly/js-client-sdk: $PR_SIZE" || gh pr comment $PR_NUMBER -b "@launchdarkly/js-client-sdk: $PR_SIZE"
[ $PR_SIZE -le 25000 ] || exit 1