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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
- 'package.json'
- 'package-lock.json'
- '.github/workflows/typescript-*'
- '.github/workflows/wasm-*'
- '.github/workflows/ci.yml'
docs:
- 'site/**'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/typescript-pr-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- 'package.json'
- 'package-lock.json'
- '.github/workflows/typescript-*'
- '.github/workflows/wasm-*'
workflow_dispatch:

jobs:
Expand All @@ -30,6 +31,13 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

call-py-check:
uses: ./.github/workflows/wasm-py-check.yml
permissions:
contents: read
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

call-ts-test:
uses: ./.github/workflows/typescript-ts-test.yml
permissions:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/typescript-ts-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Verify package-lock.json is in sync with package.json
run: |
npm install --package-lock-only --ignore-scripts
if ! git diff --quiet -- package-lock.json; then
echo "::error::package-lock.json drifted from package.json -- run 'npm install' and commit the lockfile"
git diff --stat -- package-lock.json
exit 1
fi
- name: Build
run: npm run build

Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/wasm-py-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Python Check

on:
workflow_call:
inputs:
ref:
required: true
type: string

jobs:
py-check:
name: strandly check --py
permissions:
contents: read
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ inputs.ref }}
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
package-manager-cache: false

- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install wasm-tools
run: brew install wasm-tools

- name: Bootstrap strandly + venv
run: |
npm ci
echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH"
python -m venv .venv
.venv/bin/pip install -e .

- name: Build strands-wasm
run: strandly build --wasm

- name: Install strands-py-wasm
run: .venv/bin/pip install -e strands-py-wasm

- name: strandly check --py
run: strandly check --py
37 changes: 34 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"dev": "strandly",
"prepare": "husky && npm run build",
"prepare": "husky",
"build": "npm run build -w strands-ts",
"test": "npm run test -w strands-ts",
"test:coverage": "npm run test:coverage -w strands-ts",
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ cache_dir = ".pytest_cache"
[tool.ruff]
line-length = 120
include = ["strands-py-wasm/src/**/*.py", "strandly/scripts/**/*.py"]
# _generated.py is machine-written; neither lint nor format enforce rules on it.
extend-exclude = ["strands-py-wasm/src/strands/_generated.py"]
# _generated/ is machine-written; neither lint nor format enforce rules on it.
extend-exclude = ["strands-py-wasm/src/strands/_generated/"]

[tool.ruff.lint]
select = [
Expand Down
Loading
Loading