Skip to content

example: fungible token #241

example: fungible token

example: fungible token #241

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
# Job to install dependencies and cache them
install-dependencies:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
./.devcontainer/install-dependencies.sh
- name: Cache Wasmtime and Node modules
uses: actions/cache@v3
with:
path: |
~/.wasmtime
node_modules
emsdk
wabt-1.0.35
binaryen-version_116
quickjs-2024-01-13
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-dependencies-
# Job to run unit tests
rununittest:
name: Unit tests
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- uses: actions/checkout@v2
- name: Restore Cache
uses: actions/cache@v3
with:
path: |
~/.wasmtime
node_modules
emsdk
wabt-1.0.35
binaryen-version_116
quickjs-2024-01-13
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/package-lock.json') }}
- name: Set up paths and Rust
run: |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
echo "$(pwd)/binaryen-version_116/bin" >> $GITHUB_PATH
echo "$(pwd)/wabt-1.0.35/bin" >> $GITHUB_PATH
rustup target add wasm32-wasip1
rustup target add wasm32-unknown-unknown
- name: Test path
run: |
env
whereis wasmtime
whereis wasm-opt
whereis wasm2c
- name: Run Unit Tests
run: |
./test.sh
(cd testenv && ./test.sh)
(cd examples/nft && ./test.sh)
(cd examples/minimumweb4 && ./test.sh)
(cd examples/fungibletoken && ./test.sh)
# Job to run end-to-end tests
e2etests:
name: End to end tests
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v3
with:
path: |
~/.wasmtime
node_modules
emsdk
wabt-1.0.35
binaryen-version_116
quickjs-2024-01-13
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/package-lock.json') }}
- name: Set up paths and Rust
run: |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
echo "$(pwd)/binaryen-version_116/bin" >> $GITHUB_PATH
echo "$(pwd)/wabt-1.0.35/bin" >> $GITHUB_PATH
rustup target add wasm32-wasip1
rustup target add wasm32-unknown-unknown
- name: Run End to End Tests
run: |
npm install -g near-cli
mkdir out
./build.sh
yarn install
yarn test-e2e
# Job to run NFT example end-to-end tests
e2e-test-example-nft:
name: NFT example End to End tests
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v3
with:
path: |
~/.wasmtime
node_modules
emsdk
wabt-1.0.35
binaryen-version_116
quickjs-2024-01-13
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/package-lock.json') }}
- name: Set up paths and Rust
run: |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
echo "$(pwd)/binaryen-version_116/bin" >> $GITHUB_PATH
echo "$(pwd)/wabt-1.0.35/bin" >> $GITHUB_PATH
rustup target add wasm32-wasip1
rustup target add wasm32-unknown-unknown
- name: Run NFT example End to End Tests
run: |
cd examples/nft
mkdir out
./build.sh
yarn test-examples-nft-e2e
# Job to run NFT example local JS tests
localjs-test-example-nft:
name: NFT example local JS test
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v3
with:
path: |
~/.wasmtime
node_modules
emsdk
wabt-1.0.35
binaryen-version_116
quickjs-2024-01-13
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/package-lock.json') }}
- name: Set up paths and Rust
run: |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
echo "$(pwd)/binaryen-version_116/bin" >> $GITHUB_PATH
echo "$(pwd)/wabt-1.0.35/bin" >> $GITHUB_PATH
rustup target add wasm32-wasip1
rustup target add wasm32-unknown-unknown
- name: Run NFT example local JS Tests
run: |
cd examples/nft
mkdir out
yarn test-examples-nft-localjs
# Job to run PureJS example local JS tests
localjs-test-example-purejs:
name: PureJS example local JS test
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v3
with:
path: |
~/.wasmtime
node_modules
emsdk
wabt-1.0.35
binaryen-version_116
quickjs-2024-01-13
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/package-lock.json') }}
- name: Set up paths and Rust
run: |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
echo "$(pwd)/binaryen-version_116/bin" >> $GITHUB_PATH
echo "$(pwd)/wabt-1.0.35/bin" >> $GITHUB_PATH
rustup target add wasm32-wasip1
rustup target add wasm32-unknown-unknown
- name: Run PureJS example local JS Tests
run: |
yarn test-purejs
# Job to run Web app tests
webapptests:
name: Web app tests
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v3
with:
path: |
~/.wasmtime
node_modules
emsdk
wabt-1.0.35
binaryen-version_116
quickjs-2024-01-13
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/package-lock.json') }}
- name: Set up paths and Rust
run: |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
echo "$(pwd)/binaryen-version_116/bin" >> $GITHUB_PATH
echo "$(pwd)/wabt-1.0.35/bin" >> $GITHUB_PATH
rustup target add wasm32-wasip1
rustup target add wasm32-unknown-unknown
- name: Run Web App Tests
run: |
yarn test-web