Skip to content

Bitcoin on Base / CI #388

Bitcoin on Base / CI

Bitcoin on Base / CI #388

Workflow file for this run

name: Bitcoin on Base / CI
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
environment:
description: "Environment"
required: true
type: choice
options:
- sepolia
default: sepolia
jobs:
dashboard-build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"
# We need this step because the `@keep-network/tbtc-v2` which we update in
# next step has an indirect dependency to `@summa-tx/relay-sol@2.0.2`
# package, which downloads one of its sub-dependencies via unathenticated
# `git://` protocol. That protocol is no longer supported. Thanks to this
# step `https://` is used instead of `git://`.
- name: Configure git to don't use unauthenticated protocol
run: git config --global url."https://".insteadOf git://
- name: Install dependencies
run: yarn install --ignore-scripts
- name: Run post-install script
run: yarn run postinstall
- name: Build contracts
run: yarn build
# We're excluding tests that are currently failing and need adjustments.
- name: Run tests
run: |
yarn test \
--testPathIgnorePatterns=mas.test.ts useSendTransaction.test.ts \
staking.test.ts tbtc.test.ts getStakingAppLabel.test.ts \
useFetchTvl.test.tsx
build-and-deploy:
needs: dashboard-build-and-test
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"
# We need this step because the `@keep-network/tbtc-v2` which we update in
# next step has an indirect dependency to `@summa-tx/relay-sol@2.0.2`
# package, which downloads one of its sub-dependencies via unathenticated
# `git://` protocol. That protocol is no longer supported. Thanks to this
# step `https://` is used instead of `git://`.
- name: Configure git to don't use unauthenticated protocol
run: git config --global url."https://".insteadOf git://
- name: Install dependencies
run: yarn install --ignore-scripts
- name: Run post-install script
run: yarn run postinstall
- name: Build contracts
run: yarn build
- name: Build
run: yarn build
env:
CHAIN_ID: 11155111
PUBLIC_URL: /
ETH_HOSTNAME_HTTP: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
ETH_HOSTNAME_WS: ${{ secrets.SEPOLIA_ETH_HOSTNAME_WS }}
NODE_OPTIONS: --max_old_space_size=4096
ELECTRUM_PROTOCOL: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
ELECTRUM_HOST: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
ELECTRUM_PORT: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
SENTRY_SUPPORT: true
SENTRY_DSN: ${{ secrets.TESTNET_SENTRY_DSN }}
WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
- name: Deploy to GCP
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: thesis/gcp-storage-bucket-action@v3.1.0
with:
service-key: ${{ secrets.KEEP_TEST_CI_UPLOAD_DAPP_JSON_KEY_BASE64 }}
project: keep-test-f3e0
bucket-name: "bob.test.threshold.network"
build-folder: build
set-website: ${{ inputs.preview == false }}
home-page-path: index.html
error-page-path: index.html