Show current position in Ledger Live dApp #1089
Workflow file for this run
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: Core | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "core/**" | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: "Testnet to deploy contracts to" | |
required: true | |
type: choice | |
options: | |
- "sepolia" | |
default: "sepolia" | |
defaults: | |
run: | |
working-directory: ./core | |
jobs: | |
core-build: | |
uses: ./.github/workflows/reusable-core-build.yaml | |
core-format: | |
needs: [core-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "core/.nvmrc" | |
cache: "pnpm" | |
- name: Install Dependencies | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-build | |
path: core/ | |
- name: Format | |
run: pnpm run format | |
core-slither: | |
needs: [core-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "core/.nvmrc" | |
cache: "pnpm" | |
- name: Install Dependencies | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Slither | |
env: | |
SLITHER_VERSION: 0.9.6 | |
run: pip3 install slither-analyzer==$SLITHER_VERSION | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-build | |
path: core/ | |
- name: Run Slither | |
run: slither --hardhat-ignore-compile . | |
core-test: | |
needs: [core-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "core/.nvmrc" | |
cache: "pnpm" | |
- name: Install Dependencies | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-build | |
path: core/ | |
- name: Test | |
run: pnpm run test --no-compile | |
core-deploy-dry-run: | |
needs: [core-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "core/.nvmrc" | |
cache: "pnpm" | |
- name: Install Dependencies | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-build | |
path: core/ | |
- name: Deploy | |
run: pnpm run deploy --no-compile | |
core-deploy-testnet: | |
needs: [core-deploy-dry-run] | |
if: github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "core/.nvmrc" | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-build | |
path: core/ | |
- name: Remove existing deployment artifacts for the selected network | |
run: rm -rf deployments/${{ github.event.inputs.environment }} | |
- name: Deploy contracts | |
env: | |
ACCOUNTS_PRIVATE_KEYS: ${{ secrets.TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY }} | |
CHAIN_API_URL: ${{ secrets.SEPOLIA_CHAIN_API_URL }} | |
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | |
run: | | |
pnpm run deploy --network ${{ github.event.inputs.environment }} | |
- name: Upload deployed contracts as workflow artifact | |
# The step will be executed even if the previous step fails (can be | |
# useful for partially failed deployments). | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: deployed-contracts-${{ github.event.inputs.environment }} | |
path: | | |
core/deployments/${{ github.event.inputs.environment }} | |
if-no-files-found: error |