Skip to content

AI proxy test: start and refund conversation #326

AI proxy test: start and refund conversation

AI proxy test: start and refund conversation #326

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
# Job to install dependencies and cache them
install-dependencies:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v4
with:
path: |
~/.wasmtime
~/.cargo
bin
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: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
./.devcontainer/install-dependencies.sh
# Job to run unit tests
rununittest:
name: Unit tests
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v4
with:
path: |
~/.wasmtime
~/.cargo
bin
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@v4
with:
path: |
~/.wasmtime
~/.cargo
bin
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@v4
with:
path: |
~/.wasmtime
~/.cargo
bin
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@v4
with:
path: |
~/.wasmtime
~/.cargo
bin
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 AI proxy tests
test-aiproxy:
name: Test AI proxy
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@v4
with:
path: |
~/.wasmtime
~/.cargo
bin
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
echo "$(pwd)/bin" >> $GITHUB_PATH
rustup target add wasm32-wasip1
rustup target add wasm32-wasi
rustup target add wasm32-unknown-unknown
- name: Build Fungible Token contract
run: |
cd examples/fungibletoken
./build.sh
- name: Run AI proxy spin test
run: |
spin plugin install -y -u https://github.com/fermyon/spin-test/releases/download/canary/spin-test.json
cd examples/aiproxy
spin build
spin test
- name: Run AI proxy Playwright test
run: |
cd examples/aiproxy
yarn playwright install --with-deps
yarn test-playwright-aiproxy
# 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@v4
with:
path: |
~/.wasmtime
~/.cargo
bin
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@v4
with:
path: |
~/.wasmtime
~/.cargo
bin
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@v4
with:
path: |
~/.wasmtime
~/.cargo
bin
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@v4
with:
path: |
~/.wasmtime
~/.cargo
bin
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