Skip to content

Namadillo: Fees

Namadillo: Fees #3074

name: Deploy wallet preview to netlify at PR and pushes to it
on:
pull_request:
paths:
- "apps/namadillo/**"
- "apps/extension/**"
- "packages/**"
- ".github/workflows/**"
env:
CI: false
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Run ESLint
run: yarn lint:ci
unit-tests-js:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Restore Rust cache
uses: ./.github/actions/rust-cache
with:
cache-name: unit-tests-js
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: "v0.10.3"
- name: Compile WASM
run: yarn wasm:build-test
- name: Run unit tests
id: run-unit-tests
run: yarn test:ci
- name: Report success
if: steps.run-unit-tests.outcome == 'success'
run: |
curl --header "Content-Type: application/json" \
--request POST \
--data '{"message":"Unit tests succeeded ✅\n \n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n \nReview\nhttps://pull-request-${{ github.event.number }}--wallet-development-heliax-dev.netlify.app\n \nthe PR\nhttps://github.com/anoma/namada-interface/pull/${{ github.event.number }}"}' \
${{ secrets.SLACK_WEBHOOK_WALLET_PR }}
- name: Report failure
if: steps.run-unit-tests.outcome != 'success'
run: |
curl --header "Content-Type: application/json" \
--request POST \
--data '{"message":"Unit tests failed ⛔️ \n \n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n \nReview\nhttps://pull-request-${{ github.event.number }}--wallet-development-heliax-dev.netlify.app\n \nthe PR\nhttps://github.com/anoma/namada-interface/pull/${{ github.event.number }}"}' \
${{ secrets.SLACK_WEBHOOK_WALLET_PR }}
unit-tests-wasm:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Restore Rust cache
uses: ./.github/actions/rust-cache
with:
cache-name: unit-tests-wasm
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Install wsrun
run: npm install -g wsrun
- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: "v0.10.3"
- name: Run unit tests
id: run-unit-tests
run: yarn test-wasm:ci
- name: Report success
if: steps.run-unit-tests.outcome == 'success'
run: |
curl --header "Content-Type: application/json" \
--request POST \
--data '{"message":"Unit tests succeeded ✅\n \n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n \nReview\nhttps://pull-request-${{ github.event.number }}--wallet-development-heliax-dev.netlify.app\n \nthe PR\nhttps://github.com/anoma/namada-interface/pull/${{ github.event.number }}"}' \
${{ secrets.SLACK_WEBHOOK_WALLET_PR }}
- name: Report failure
if: steps.run-unit-tests.outcome != 'success'
run: |
curl --header "Content-Type: application/json" \
--request POST \
--data '{"message":"Unit tests failed ⛔️ \n \n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n \nReview\nhttps://pull-request-${{ github.event.number }}--wallet-development-heliax-dev.netlify.app\n \nthe PR\nhttps://github.com/anoma/namada-interface/pull/${{ github.event.number }}"}' \
${{ secrets.SLACK_WEBHOOK_WALLET_PR }}
build-interface:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Restore Rust cache
uses: ./.github/actions/rust-cache
with:
cache-name: build
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: "v0.10.3"
- name: Rustup add target
run: rustup target add wasm32-unknown-unknown
- name: build the site
working-directory: ./apps/namadillo
run: yarn build
env:
NAMADA_INTERFACE_NAMADA_ALIAS: "Namada Devnet"
NAMADA_INTERFACE_NAMADA_CHAIN_ID: "internal-devnet-6be.86067e06a5"
NAMADA_INTERFACE_NAMADA_URL: "https://proxy.heliax.click/internal-devnet-6be.86067e06a5"
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: "./apps/namadillo/dist"
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "deploy ${{ github.event.number }} at creating a PR"
alias: pull-request-${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN_WALLET_PREVIEW }}
NETLIFY_SITE_ID: 1f548c68-c620-4522-97e0-0d85c08366fb
# namada.me
# NETLIFY_SITE_ID: 2380782e-9b20-477a-bc27-b4e9d05e16f3
- name: Slack Notification
run: |
curl --header "Content-Type: application/json" \
--request POST \
--data '{"message":"New deployment for a PR\nhttps://pull-request-${{ github.event.number }}--wallet-development-heliax-dev.netlify.app\n \nthe PR\nhttps://github.com/anoma/namada-interface/pull/${{ github.event.number }}"}' \
${{ secrets.SLACK_WEBHOOK_WALLET_PR }}
build-extension-chrome:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Restore Rust cache
uses: ./.github/actions/rust-cache
with:
cache-name: build
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Build WASM dependencies
working-directory: ./apps/extension
run: yarn wasm:build:multicore
- name: Build the extension
working-directory: ./apps/extension
run: yarn build:chrome
# GitHub actions zips artifacts so we need to unzip the built extension to
# avoid a double zip
- name: Prepare artifact
id: prepare-artifact
working-directory: ./apps/extension/build/chrome
run: |
mkdir artifact
unzip -d artifact namada_extension-*.zip
- uses: actions/upload-artifact@v3
with:
name: namada-extension-chrome
path: ./apps/extension/build/chrome/artifact/*
build-extension-firefox:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Restore Rust cache
uses: ./.github/actions/rust-cache
with:
cache-name: build
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Build WASM dependencies
working-directory: ./apps/extension
run: yarn wasm:build
- name: Build the extension
working-directory: ./apps/extension
run: yarn build:firefox
# GitHub actions zips artifacts so we need to unzip the built extension to
# avoid a double zip
- name: Prepare artifact
id: prepare-artifact
working-directory: ./apps/extension/build/firefox
run: |
mkdir artifact
unzip -d artifact namada_extension-*.zip
- uses: actions/upload-artifact@v3
with:
name: namada-extension-firefox
path: ./apps/extension/build/firefox/artifact/*
E2E-tests:
needs: [build-interface, build-extension-chrome]
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./apps/namadillo
steps:
- uses: actions/checkout@v3
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- uses: actions/setup-node@v2
with:
node-version: "18.x"
- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: "v0.10.3"
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
id: run-playwright-tests
run: PLAYWRIGHT_BASE_URL=https://pull-request-${{ github.event.number }}--wallet-development-heliax-dev.netlify.app NETLIFY_SITE_PROTECTION_PASSWORD=${{ secrets.NETLIFY_SITE_PROTECTION_PASSWORD }} yarn playwright test
- name: report success
if: steps.run-playwright-tests.outcome == 'success'
run: |
curl --header "Content-Type: application/json" \
--request POST \
--data '{"message":"E2E tests succeeded ✅\n \n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n \nReview\nhttps://pull-request-${{ github.event.number }}--wallet-development-heliax-dev.netlify.app\n \nthe PR\nhttps://github.com/anoma/namada-interface/pull/${{ github.event.number }}"}' \
${{ secrets.SLACK_WEBHOOK_WALLET_PR }}
- name: report failure
if: failure() && steps.run-playwright-tests.outcome != 'success'
run: |
curl --header "Content-Type: application/json" \
--request POST \
--data '{"message":"E2E tests failed ⛔️ \n \n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n \nReview\nhttps://pull-request-${{ github.event.number }}--wallet-development-heliax-dev.netlify.app\n \nthe PR\nhttps://github.com/anoma/namada-interface/pull/${{ github.event.number }}"}' \
${{ secrets.SLACK_WEBHOOK_WALLET_PR }}
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30