Skip to content

Commit 83ec80f

Browse files
v4.0.0 (#688)
2 parents 8ff289c + 8b80098 commit 83ec80f

115 files changed

Lines changed: 10852 additions & 5907 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## 📝 Summary
2+
3+
## <!-- Short description of what this PR does and what was the issue? -->
4+
5+
## 🔧 Context / Implementation
6+
7+
## <!-- Brief explanation of the change, reasoning, or relevant background -->
8+
9+
## 🧪 Test Plan
10+
11+
<!-- Steps to verify the change -->
12+
13+
1. First step
14+
2. Second step
15+
3. Expected result
16+
17+
## 🖼️ Screenshots (if applicable)
18+
19+
| Before | After |
20+
| ------ | ----- |
21+
| | |
22+
23+
<!--
24+
## ✅ Checklist
25+
- [ ] Follows **conventional commit** style (`feat:`, `fix:`, `chore:`, etc.)
26+
- [ ] Tests / CI checks pass
27+
- [ ] Reviewed and approved by required **CODEOWNERS**
28+
- [ ] Branch is up-to-date and ready to merge
29+
-->

.github/dependabot.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 2
2+
updates:
3+
# npm dependencies - daily checks, grouped security updates, individual PRs for others
4+
- package-ecosystem: 'npm'
5+
directory: '/'
6+
schedule:
7+
interval: 'daily'
8+
versioning-strategy: 'increase-if-necessary'
9+
open-pull-requests-limit: 10
10+
commit-message:
11+
prefix: 'deps'
12+
prefix-development: 'deps'
13+
include: 'scope'
14+
labels:
15+
- 'dependencies'
16+
groups:
17+
security-patches:
18+
applies-to: security-updates
19+
patterns:
20+
- '*'
21+
22+
# GitHub Actions - monthly
23+
- package-ecosystem: 'github-actions'
24+
directory: '/'
25+
schedule:
26+
interval: 'monthly'
27+
open-pull-requests-limit: 3
28+
commit-message:
29+
prefix: 'ci'
30+
include: 'scope'
31+
labels:
32+
- 'github-actions'

.github/workflows/build-test.yml

Lines changed: 95 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
1-
name: Build
1+
name: CI
22

3-
on: push
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
- 'release/**'
9+
pull_request:
10+
branches:
11+
- main
12+
- dev
13+
- 'release/**'
414

515
jobs:
616
build:
7-
name: Build
17+
name: Lint, Build & Unit, E2E Tests
818
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: read
22+
env:
23+
INTERNAL_EVENT: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
924

1025
steps:
1126
- name: Checkout code
12-
uses: actions/checkout@v3
27+
uses: actions/checkout@v5
1328

1429
- name: Install Node.js
1530
uses: actions/setup-node@v3
@@ -34,4 +49,80 @@ jobs:
3449
run: pnpm run build
3550

3651
- name: Release a nightly build
52+
if: env.INTERNAL_EVENT == 'true'
3753
run: pnpx pkg-pr-new publish
54+
55+
- name: Checkout lattice-simulator
56+
if: env.INTERNAL_EVENT == 'true'
57+
uses: actions/checkout@v5
58+
with:
59+
repository: GridPlus/lattice-simulator
60+
path: lattice-simulator
61+
token: ${{ secrets.GRIDPLUS_SIM_PAT }}
62+
63+
- name: Install simulator dependencies
64+
if: env.INTERNAL_EVENT == 'true'
65+
working-directory: lattice-simulator
66+
run: pnpm install
67+
68+
- name: Start simulator in background
69+
if: env.INTERNAL_EVENT == 'true'
70+
working-directory: lattice-simulator
71+
env:
72+
CI: '1'
73+
DEBUG_SIGNING: '1'
74+
DEBUG: 'lattice*'
75+
LATTICE_MNEMONIC: 'test test test test test test test test test test test junk'
76+
PORT: '3000'
77+
DEVICE_ID: 'SD0001'
78+
PASSWORD: '12345678'
79+
PAIRING_SECRET: '12345678'
80+
ENC_PW: '12345678'
81+
run: |
82+
pnpm run dev > simulator.log 2>&1 &
83+
echo $! > simulator.pid
84+
echo "Simulator PID: $(cat simulator.pid)"
85+
86+
# Wait for simulator to be ready
87+
echo "Waiting for simulator to start..."
88+
for i in {1..30}; do
89+
if curl -s http://localhost:3000 > /dev/null 2>&1; then
90+
echo "Simulator is ready!"
91+
break
92+
fi
93+
if [ $i -eq 30 ]; then
94+
echo "Simulator failed to start within 30 seconds"
95+
cat simulator.log
96+
exit 1
97+
fi
98+
sleep 1
99+
done
100+
101+
- name: Run SDK e2e tests with simulator
102+
if: env.INTERNAL_EVENT == 'true'
103+
working-directory: ${{ github.workspace }}
104+
env:
105+
CI: '1'
106+
DEBUG_SIGNING: '1'
107+
baseUrl: 'http://127.0.0.1:3000'
108+
DEVICE_ID: 'SD0001'
109+
PASSWORD: '12345678'
110+
PAIRING_SECRET: '12345678'
111+
ENC_PW: '12345678'
112+
APP_NAME: 'lattice-manager'
113+
run: pnpm run e2e --reporter=basic
114+
115+
- name: Show simulator logs on failure
116+
if: failure() && env.INTERNAL_EVENT == 'true'
117+
working-directory: lattice-simulator
118+
run: |
119+
echo "=== Simulator logs ==="
120+
cat simulator.log || echo "No simulator logs found"
121+
122+
- name: Stop simulator
123+
if: always() && env.INTERNAL_EVENT == 'true'
124+
working-directory: lattice-simulator
125+
run: |
126+
if [ -f simulator.pid ]; then
127+
kill $(cat simulator.pid) || true
128+
fi

.github/workflows/docs-build-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
steps:
1111
- name: Checkout code
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v5
1313

1414
- name: Install Node.js
1515
uses: actions/setup-node@v3
@@ -52,7 +52,7 @@ jobs:
5252
path: docs/build
5353

5454
- name: Deploy to gh-pages
55-
uses: peaceiris/actions-gh-pages@v3
55+
uses: peaceiris/actions-gh-pages@v4
5656
with:
5757
github_token: ${{ secrets.GITHUB_TOKEN }}
5858
publish_dir: docs/build

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v5
1414

1515
- name: Install Node.js
1616
uses: actions/setup-node@v3

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
22

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# JSONC files with comments - parser incompatibility
2+
src/__test__/vectors.jsonc
3+
4+
# Generated lockfiles
5+
pnpm-lock.yaml

.readthedocs.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 0 additions & 109 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)