-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
720e3b0
commit a322f91
Showing
9 changed files
with
122 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,33 +22,40 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
# 👇 Build steps | ||
|
||
- name: install wasm-pack | ||
uses: jetli/[email protected] | ||
with: | ||
version: latest | ||
|
||
- name: build pkg | ||
run: wasm-pack build --target web | ||
run: wasm-pack build --target web --no-opt | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
cache: 'npm' | ||
cache-dependency-path: './docs/package-lock.json' | ||
|
||
- name: Install dependencies | ||
working-directory: ./docs | ||
run: npm install --frozen-lockfile --non-interactive | ||
|
||
- name: Build | ||
working-directory: ./docs | ||
run: npm run build | ||
|
||
# 👆 Build steps | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
# 👇 Specify build output path | ||
path: ./docs/build | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Web Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: main | ||
|
||
jobs: | ||
wasm-pack-test: | ||
runs-on: ubuntu-latest | ||
name: fmt-clippy | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: install wasm-pack | ||
uses: jetli/[email protected] | ||
with: | ||
version: latest | ||
|
||
- name: Install Just | ||
uses: extractions/setup-just@v2 | ||
|
||
- name: Run tests | ||
run: just test-web |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
|
||
build: | ||
wasm-pack build -t web --release | ||
|
||
test-web: | ||
WASM_BINDGEN_TEST_TIMEOUT=99999 wasm-pack test --release --headless --chrome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use wasm_bindgen_test::*; | ||
wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); | ||
|
||
use webzjs::account::Account; | ||
|
||
#[wasm_bindgen_test] | ||
fn test_account_from_seed() { | ||
let seed = [0; 32]; | ||
let a = Account::from_seed(&seed, 0).unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"moz:firefoxOptions": { | ||
"prefs": { | ||
"media.navigator.streams.fake": true, | ||
"media.navigator.permission.disabled": true | ||
}, | ||
"args": [] | ||
}, | ||
"goog:chromeOptions": { | ||
"args": [ | ||
"--use-fake-device-for-media-stream", | ||
"--use-fake-ui-for-media-stream", | ||
"--disable-timeouts-for-profiling" | ||
] | ||
} | ||
} |