Skip to content

chore(repo): promote contracts to root and update CI #7

chore(repo): promote contracts to root and update CI

chore(repo): promote contracts to root and update CI #7

Workflow file for this run

# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: ci-default
env:
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
FOUNDRY_PROFILE: "ci"
# Trigger the workflow when:
on:
pull_request:
branches:
- "main"
- "dev"
push:
branches:
- "main"
- "dev"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Cancel in progress jobs on new pushes.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-and-test:
# NOTE: This name appears in GitHub's Checks API.
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Verify submodules are checked out
run: |
git submodule status
git submodule foreach 'echo Submodule $name checked out to $sha1'
- name: Ensure all submodules are initialized
run: |
git submodule foreach --quiet 'test -d "$name" || (echo "Submodule $name is missing!" && exit 1)'
- name: Inspect directory structure
run: |
echo "Root directory contents:"
ls -la
echo "Project directory contents:"
ls -la /home/runner/work/hypercerts-protocol/hypercerts-protocol
echo "lib directory contents:"
ls -la /home/runner/work/hypercerts-protocol/hypercerts-protocol/lib
- name: Find specific file
run: |
echo "Searching for MerkleProofUpgradeable.sol..."
find /home/runner/work/hypercerts-protocol/hypercerts-protocol -name "MerkleProofUpgradeable.sol" -print
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- run: corepack enable
- name: Set up Node.js 18
uses: actions/setup-node@v4
with:
cache: "pnpm"
- name: Install dependencies
run: |
pnpm i
# Always run this step so that all linting errors can be seen at once.
if: always()
- name: Build packages
run: |
pnpm build
# Always run this step so that all linting errors can be seen at once.
if: always()
- name: Lint code
run: |
pnpm lint
# Always run this step so that all linting errors can be seen at once.
if: always()
- name: Test contracts
run: |
pnpm test
# Always run this step so that all linting errors can be seen at once.
if: always()