-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
171 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,77 +5,16 @@ on: | |
env: | ||
CI: false | ||
YARN_ENABLE_HARDENED_MODE: 0 | ||
INDEXER_URL: https://indexer.public.heliax.work/internal-devnet-43.35fd77a4447 | ||
RPC_URL: https://proxy.public.heliax.work/internal-devnet-43.35fd77a4447 | ||
CHAIN_ID: internal-devnet-43.35fd77a4447 | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install yarn dependencies | ||
uses: ./.github/actions/yarn-cache | ||
|
||
- name: Run ESLint | ||
run: yarn lint:ci | ||
|
||
unit-tests-js: | ||
name: JS unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- 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: Compile WASM | ||
run: yarn wasm:build-test | ||
|
||
- name: Run unit tests | ||
id: run-unit-tests | ||
run: yarn test:ci | ||
|
||
unit-tests-wasm: | ||
name: WASM unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- 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: Run unit tests | ||
id: run-unit-tests | ||
run: yarn test-wasm:ci | ||
|
||
build-interface: | ||
name: Build Namadillo | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install yarn dependencies | ||
uses: ./.github/actions/yarn-cache | ||
|
@@ -88,121 +27,41 @@ jobs: | |
- name: Install protoc | ||
run: sudo apt-get install -y protobuf-compiler | ||
|
||
- name: build the site | ||
- name: Build Namadillo | ||
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" | ||
|
||
build-extension-chrome: | ||
name: Build Chrome extension | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install yarn dependencies | ||
uses: ./.github/actions/yarn-cache | ||
|
||
- name: Restore Rust cache | ||
uses: ./.github/actions/rust-cache | ||
with: | ||
cache-name: build-multicore | ||
|
||
- 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: Configure Namadillo | ||
working-directory: ./apps/namadillo | ||
run: | | ||
echo "" > dist/config.toml | ||
echo "indexer_url = \"${{ env.INDEXER_URL }}\"" >> dist/config.toml | ||
echo "rpc_url = \"${{ env.RPC_URL }}\"" >> dist/config.toml | ||
- name: Build the extension | ||
- name: Build the Chrome extension | ||
working-directory: ./apps/extension | ||
run: yarn build:chrome | ||
env: | ||
NAMADA_INTERFACE_NAMADA_CHAIN_ID: ${{ env.CHAIN_ID }} | ||
|
||
build-extension-firefox: | ||
name: Build Firefox extension | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- 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 | ||
- name: Build the Firefox extension | ||
working-directory: ./apps/extension | ||
run: yarn build:firefox | ||
env: | ||
NAMADA_INTERFACE_NAMADA_CHAIN_ID: ${{ env.CHAIN_ID }} | ||
|
||
E2E-tests: | ||
if: false | ||
name: E2E tests | ||
needs: [build-interface] | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./apps/namadillo | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install yarn dependencies | ||
uses: ./.github/actions/yarn-cache | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "18.x" | ||
- name: Copy the extensions for deployment | ||
run: | | ||
cp apps/extension/build/firefox/namada_extension-*.zip apps/namadillo/dist/namada-extension-firefox.zip | ||
cp apps/extension/build/chrome/namada_extension-*.zip apps/namadillo/dist/namada-extension-chrome.zip | ||
- 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 | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
|
||
# Running yarn install in hardened mode here makes it safe to run the other | ||
# jobs without hardened mode, which is good because hardened mode is slow. | ||
# https://yarnpkg.com/features/security#hardened-mode | ||
check-yarn-lock-poisoning: | ||
name: Check for yarn.lock poisoning | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check if yarn.lock changed | ||
uses: dorny/paths-filter@v3 | ||
id: filter | ||
with: | ||
filters: | | ||
lockfile: | ||
- "yarn.lock" | ||
- name: Check yarn.lock for lockfile poisoning | ||
if: steps.filter.outputs.lockfile == 'true' | ||
uses: ./.github/actions/yarn-cache | ||
publish-dir: "./apps/namadillo/dist" | ||
production-deploy: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
deploy-message: "Merged PR ${{ github.event.number }} to main" | ||
env: | ||
YARN_ENABLE_HARDENED_MODE: 1 | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN_WALLET_PREVIEW }} | ||
NETLIFY_SITE_ID: 2380782e-9b20-477a-bc27-b4e9d05e16f3 |