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

0.0.5 #5

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
184 changes: 0 additions & 184 deletions bench/MemoryBTree/with-cache.mo

This file was deleted.

39 changes: 22 additions & 17 deletions dfx.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{
"version": 1,
"canisters": {
"actor_test" : {
"main": "tests/MemoryBuffer.ActorTest.mo",
"type": "motoko"
}
"version": 1,
"canisters": {
"actor_test": {
"main": "tests/MemoryBuffer.ActorTest.mo",
"type": "motoko"
},
"defaults": {
"build": {
"packtool": "mops sources",
"args": "--incremental-gc"
}
},
"networks": {
"local": {
"bind": "127.0.0.1:8000",
"type": "ephemeral"
}
"stress_test": {
"main": "tests/MemoryBTree/MemoryBTree.StressTest.Replica.mo",
"type": "motoko",
"args": "--max-stable-pages 1638400"
}
},
"defaults": {
"build": {
"packtool": "mops sources",
"args": "--incremental-gc"
}
},
"networks": {
"local": {
"bind": "127.0.0.1:4943",
"type": "ephemeral"
}
}
}
2 changes: 1 addition & 1 deletion example/MemoryBTree.mo
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ actor {
orders_sstore := MemoryBTree.upgrade(orders_sstore);

// If two orders are placed at the same timestamp, the second order will overwrite the first
// so for this test we assume that no two orders are placed at the same timestamp
// so for this test we assume that no two orders are placed at the same time
let orders = MemoryBTree.MemoryBTree<Time, Order>(orders_sstore, orders_btree_utils);

let product_prices = [39.99, 7.23, 12.99, 87.00, 5.99];
Expand Down
35 changes: 35 additions & 0 deletions example/txs/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Tests

on:
# push:
# branches: [ "main" ]
pull_request:

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dfx
uses: dfinity/setup-dfx@main
- name: Start dfx
run: |
dfx cache install
dfx start --background
- run: npm run setup
- run: npm test
38 changes: 38 additions & 0 deletions example/txs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Canisters
/src/declarations
.dfx
.vessel
.mops

# Environment variables
.env
.env.local
.env.development
.env.test
.env.production
31 changes: 31 additions & 0 deletions example/txs/.gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Online IDE configuration (safe to delete)

tasks:
- before: |
npm install &
export MO_DEV_HIDE_URLS=1 # hide Candid UI links
export PATH="$HOME/bin:$PATH"
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
sudo apt-get install -q -y libunwind-dev
DFXVM_INIT_YES=1 sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
source "$HOME/.local/share/dfx/env"
dfx start --background --clean
npm run setup
init: |
npm start
command: |
npm start

vscode:
extensions:
- dfinity-foundation.vscode-motoko

ports:
- name: Replica
port: 4943
visibility: public
onOpen: ignore
- name: Dev Server
port: 3000
visibility: public
onOpen: open-browser
1 change: 1 addition & 0 deletions example/txs/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/src/declarations
7 changes: 7 additions & 0 deletions example/txs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"semi": true,
"tabWidth": 4,
"bracketSpacing": true,
"trailingComma": "all"
}
Loading
Loading