near-sdk 5.5.0 and docs #271
Workflow file for this run
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
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: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- 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('**/yarn.lock', '.devcontainer/install-dependencies.sh') }} | |
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('**/yarn.lock', '.devcontainer/install-dependencies.sh') }} | |
- 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 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: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- 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('**/yarn.lock', '.devcontainer/install-dependencies.sh') }} | |
- 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: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- 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('**/yarn.lock', '.devcontainer/install-dependencies.sh') }} | |
- 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: | | |
yarn install | |
cd examples/nft | |
mkdir out | |
./build.sh | |
yarn test-examples-nft-e2e | |
# Job to run Fungible Token example end-to-end tests | |
e2e-test-example-fungibletoken: | |
name: Fungible Token example End to End tests | |
runs-on: ubuntu-latest | |
needs: install-dependencies | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- 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('**/yarn.lock', '.devcontainer/install-dependencies.sh') }} | |
- 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 Fungible Token example End to End Tests | |
run: | | |
yarn install | |
yarn test-examples-fungibletoken-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: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- 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('**/yarn.lock', '.devcontainer/install-dependencies.sh') }} | |
- 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: | | |
yarn install | |
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: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- 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('**/yarn.lock', '.devcontainer/install-dependencies.sh') }} | |
- 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 install | |
yarn test-purejs | |
quickjslib-test: | |
name: QuickJSlib test | |
runs-on: ubuntu-latest | |
needs: install-dependencies | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- 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('**/yarn.lock', '.devcontainer/install-dependencies.sh') }} | |
- name: Set up paths | |
run: | | |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH | |
echo "$(pwd)/binaryen-version_116/bin" >> $GITHUB_PATH | |
echo "$(pwd)/wabt-1.0.35/bin" >> $GITHUB_PATH | |
- name: Run QuickJSLib Tests | |
run: | | |
yarn install | |
yarn test-quickjslib | |
# Job to run Web app tests | |
webapptests: | |
name: Web app tests | |
runs-on: ubuntu-latest | |
needs: install-dependencies | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- 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('**/yarn.lock', '.devcontainer/install-dependencies.sh') }} | |
- 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 install | |
yarn test-web |