Merge pull request #100 from NillionNetwork/chore/replace-nillion-repo #248
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] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "23" | |
- uses: pnpm/action-setup@v4 | |
- run: pnpm install | |
- run: pnpm exec biome format | |
- run: pnpm exec biome lint | |
client-wasm: | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Install rustup | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly-2024-07-01 | |
target: wasm32-unknown-unknown | |
- uses: jdx/mise-action@v2 | |
- uses: pnpm/action-setup@v4 | |
- run: pnpm install | |
- run: pnpm --filter "@nillion/client-wasm" rust:check:format | |
- run: pnpm --filter "@nillion/client-wasm" rust:build | |
- run: pnpm --filter "@nillion/client-wasm" rust:clippy | |
- run: pnpm --filter "@nillion/client-wasm" build | |
- run: pnpm --filter "@nillion/client-wasm" test | |
client-vms: | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "23.0" | |
- uses: pnpm/action-setup@v4 | |
- run: pnpm install | |
- run: pnpm build:proto | |
- run: pnpm --filter "@nillion/client-vms" build | |
- run: pnpm exec tsc -p client-vms/tsconfig.json | |
- name: Get SDK Version | |
id: get-sdk-version | |
run: | | |
VERSION=$(cat .nil-sdk.toml | sed -e "s|.*\"\(.*\)\".*|\1|g") | |
echo "version=$VERSION" > $GITHUB_OUTPUT | |
- name: Install nillion SDK | |
uses: NillionNetwork/nillion-setup-action@main | |
with: | |
version: ${{ steps.get-sdk-version.outputs.version }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- run: | | |
cd client-vms/tests-nada-programs | |
./build.sh | |
- run: | | |
nillion-devnet --seed test & | |
sleep 10 | |
cd client-vms | |
pnpm vitest --coverage | |
killall -9 nillion-devnet | |
- uses: davelosert/vitest-coverage-report-action@v2 | |
if: always() | |
with: | |
working-directory: ./client-vms | |
comment-on: "pr" | |
client-react-hooks: | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "23.0" | |
- uses: pnpm/action-setup@v4 | |
- run: pnpm install | |
- run: pnpm --filter "@nillion/client-vms" build | |
- run: pnpm --filter "@nillion/client-react-hooks" build | |
- run: pnpm exec tsc -p client-react-hooks/tsconfig.json |