Skip to content

FIX: Validate Snap arguments #48

FIX: Validate Snap arguments

FIX: Validate Snap arguments #48

Workflow file for this run

name: Build, Lint, and Test
on:
push:
branches: [main]
pull_request:
jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install Yarn dependencies
run: yarn --immutable
build:
name: Build
runs-on: ubuntu-latest
needs:
- prepare
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn --immutable --immutable-cache
- run: yarn build
- name: Cache snap build
uses: actions/cache@v3
with:
path: ./packages/snap/dist
key: snap-${{ runner.os }}-${{ github.sha }}
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi
lint:
name: Lint
runs-on: ubuntu-latest
needs:
- prepare
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn --immutable --immutable-cache
- run: yarn lint
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi
e2e-test:
name: End-to-end Test
runs-on: ubuntu-latest
needs:
- prepare
- build
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install WASM tools
run: |
PACKAGE_URL="https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz"
INSTALL_PATH="/usr/local/bin"
curl -L $PACKAGE_URL | tar xz -C $INSTALL_PATH
shell: bash
- name: Install WABT
run: |
PACKAGE_URL="https://github.com/WebAssembly/wabt/releases/download/1.0.34/wabt-1.0.34-ubuntu.tar.gz"
INSTALL_PATH="/usr/local/bin"
curl -L $PACKAGE_URL | tar xz -C $INSTALL_PATH
shell: bash
- name: Setup Rust toolchain
run: rustup target add wasm32-wasi
- name: Restore snap build cache
uses: actions/cache@v3
with:
path: ./packages/snap/dist
key: snap-${{ runner.os }}-${{ github.sha }}
- run: yarn install --immutable
- name: Install Google Chrome
run: yarn install-chrome
- name: Update WASM
run: PATH="/usr/local/bin/binaryen-version_116/bin:/usr/local/bin/wabt-1.0.34/bin:$PATH" yarn update-wasm
- name: Run e2e tests
run: yarn workspace sov-snap run test