Skip to content

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

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

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

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: Log content of lib/openzeppelin-contracts-upgradeable/package.json
run: |
cat lib/openzeppelin-contracts-upgradeable/package.json
- name: Force update submodules
run: |
git submodule update --init --recursive --force
git submodule foreach git fetch --all
git submodule foreach git reset --hard origin/HEAD
- name: Debug submodules
run: |
echo "Current directory:"
pwd
echo "\nList .gitmodules content:"
cat .gitmodules
echo "\nList lib directory:"
ls -la lib/
echo "\nList openzeppelin directory if it exists:"
ls -la lib/openzeppelin-contracts-upgradeable/ || echo "Directory doesn't exist"
echo "\nGit submodule status:"
git submodule status
- name: Debug directory structure
run: |
ls -la lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/
pwd
- name: Log content of lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/MerkleProofUpgradeable.sol
run: |
cat lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/MerkleProofUpgradeable.sol
- 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()