Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Modus AssemblyScript SDK #423

Merged
merged 27 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
83772f1
import assemblyscript sdk files
mattjohnsonpint Oct 3, 2024
387380e
Move script to folder
mattjohnsonpint Oct 3, 2024
581ac5c
Update dependencies
mattjohnsonpint Oct 3, 2024
7c16492
Remove MIT license in favor of common Apache license
mattjohnsonpint Oct 3, 2024
7e57822
Move to sdk folder
mattjohnsonpint Oct 4, 2024
1d45236
merge vscode settings
mattjohnsonpint Oct 4, 2024
0783996
Move spelling dictionary to separate file
mattjohnsonpint Oct 4, 2024
cd07154
Update gitignore files
mattjohnsonpint Oct 4, 2024
632f2e5
cleanup dependencies
mattjohnsonpint Oct 4, 2024
5a25d8f
.
mattjohnsonpint Oct 4, 2024
2472fec
Update README.md
mattjohnsonpint Oct 4, 2024
3f46729
Update LICENSE
mattjohnsonpint Oct 4, 2024
e3ec014
Merge dependabot config
mattjohnsonpint Oct 4, 2024
9e6be71
Update workflows
mattjohnsonpint Oct 4, 2024
8fc47fb
Rename functions-as to modus-sdk-as
mattjohnsonpint Oct 4, 2024
5322253
Update package license identifiers
mattjohnsonpint Oct 4, 2024
6bfe7e5
.
mattjohnsonpint Oct 4, 2024
23e31d8
Rebuild lockfiles
mattjohnsonpint Oct 4, 2024
d534f38
Rebuild wasm
mattjohnsonpint Oct 4, 2024
550d1dc
Renaming things
mattjohnsonpint Oct 4, 2024
67ab818
Add copyright headers
mattjohnsonpint Oct 4, 2024
1f00393
more renaming
mattjohnsonpint Oct 4, 2024
c714628
Update testdata.wasm
mattjohnsonpint Oct 4, 2024
7a7f3a4
Update CHANGELOG.md
mattjohnsonpint Oct 4, 2024
4c0c54b
Update SDK names and fix runtime
mattjohnsonpint Oct 4, 2024
065890b
Update workflows
mattjohnsonpint Oct 4, 2024
c3502e9
Rename examples
mattjohnsonpint Oct 4, 2024
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
27 changes: 22 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
time: "16:00"
groups:
actions:
update-types:
- "patch"
- "minor"
- "major"

- package-ecosystem: "gomod"
directories:
- "/"
Expand All @@ -19,15 +32,19 @@ updates:
- "minor"
- "patch"

- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: "npm"
versioning-strategy: increase
directories:
- "/sdk/assemblyscript/src"
- "/sdk/assemblyscript/examples/*"
- "/runtime/languages/assemblyscript/testdata"
schedule:
interval: "weekly"
day: "wednesday"
time: "16:00"
groups:
actions:
minor-and-patch:
applies-to: version-updates
update-types:
- "patch"
- "minor"
- "major"
- "patch"
48 changes: 48 additions & 0 deletions .github/workflows/ci-sdk-as-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: ci-sdk-as-build
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
get-dirs:
if: github.event_name == 'pull_request'
name: find examples
runs-on: ubuntu-latest
outputs:
dirs: ${{ steps.get-dirs.outputs.dirs }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Find Examples
id: get-dirs
# we need to build all the examples
run: echo "dirs=$(ls -d sdk/assemblyscript/examples/* | jq -Rsc 'split("\n")[:-1]' )" >> ${GITHUB_OUTPUT}

sdk-as-build-examples:
needs: get-dirs
if: github.event_name == 'pull_request'
name: build
runs-on: ubuntu-latest
strategy:
matrix:
dir: ${{ fromJson(needs.get-dirs.outputs.dirs) }}
defaults:
run:
working-directory: ${{ matrix.dir }}
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ">=20"
- name: Install source dependencies
working-directory: sdk/assemblyscript/src
run: npm install
- name: Install example dependencies
run: npm install
- name: Build project
run: npm run build
71 changes: 71 additions & 0 deletions .github/workflows/ci-sdk-as-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: ci-sdk-as-lint
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
get-dirs:
if: github.event_name == 'pull_request'
name: find examples
runs-on: ubuntu-latest
outputs:
dirs: ${{ steps.get-dirs.outputs.dirs }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Find Examples
id: get-dirs
# we need to lint all the examples
run: echo "dirs=$(ls -d sdk/assemblyscript/examples/* | jq -Rsc 'split("\n")[:-1]' )" >> ${GITHUB_OUTPUT}

sdk-as-lint-src:
if: github.event_name == 'pull_request'
name: lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdk/assemblyscript/src
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ">=20"
- name: Install dependencies
run: npm install
- name: Check formatting
run: npm run pretty:check
- name: Lint project
run: npm run lint

sdk-as-lint-examples:
needs: get-dirs
if: github.event_name == 'pull_request'
name: lint
runs-on: ubuntu-latest
strategy:
matrix:
dir: ${{ fromJson(needs.get-dirs.outputs.dirs) }}
defaults:
run:
working-directory: ${{ matrix.dir }}
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ">=20"
- name: Install source dependencies
working-directory: sdk/assemblyscript/src
run: npm install
- name: Install example dependencies
run: npm install
- name: Check formatting
run: npm run pretty:check
- name: Lint project
run: npm run lint
26 changes: 26 additions & 0 deletions .github/workflows/ci-sdk-as-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ci-sdk-as-test
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
sdk-as-test:
if: github.event_name == 'pull_request'
name: AssemblyScript SDK Unit Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdk/assemblyscript/src
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ">=20"
- name: Install dependencies
run: npm install
- name: Run Unit Tests
run: npm run test
22 changes: 19 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# Ignore macOS system files
.DS_Store

# Ignore environment variable files
.env
.env.*
.DS_Store
__debug_bin*

# Ignore output files
*.exe
*.wasm
*.wat

# Ignore Go debuger and generated files
__debug_bin*
*_generated.go

node_modules/
# Ignore build output directories
build/

# Ignore node_modules folders
node_modules/

# For now, our JS/TS/AS projects use NPM with package-lock.json files only.
# Ignore lockfiles for other package managers.
pnpm-lock.yaml
yarn.lock
bun.lockb
5 changes: 4 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"recommendations": [
"amazonwebservices.aws-toolkit-vscode",
"dbaeumer.vscode-eslint",
"DavidAnson.vscode-markdownlint",
"esbenp.prettier-vscode",
"golang.go",
"GraphQL.vscode-graphql",
"ms-vscode.makefile-tools",
"streetsidesoftware.code-spell-checker"
]
}
Loading
Loading