Skip to content

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

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

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

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"
fetch-depth: 0
- name: Log content of lib/openzeppelin-contracts-upgradeable/package.json
run: |
cat lib/openzeppelin-contracts-upgradeable/package.json
- name: Checkout and setup submodules
run: |
git submodule update --init --recursive
cd lib/openzeppelin-contracts-upgradeable
git fetch --all --tags --force
git checkout 2d081f24cac1a867f6f73d512f2022e1fa987854
cd ../..
- name: Debug tags
run: |
cd lib/openzeppelin-contracts-upgradeable
git tag -l
cd ../..
- name: Debug submodule state
run: |
echo "1. Current directory structure:"
ls -la
echo "\n2. Submodule status before:"
git submodule status
echo "\n3. Entering submodule:"
cd lib/openzeppelin-contracts-upgradeable
echo "\n4. Remote information:"
git remote -v
echo "\n5. Available commits:"
git log --oneline | head -n 5
echo "\n6. Attempting fetch:"
git fetch --unshallow || git fetch --all
echo "\n7. Try checkout:"
git checkout 2d081f24cac1a867f6f73d512f2022e1fa987854
echo "\n8. Final status:"
git status
cd ../..
- name: Debug OpenZeppelin version
run: |
cd lib/openzeppelin-contracts-upgradeable
echo "Current git status:"
git status
echo "\nCurrent commit hash:"
git rev-parse HEAD
echo "\nCurrent tag:"
git describe --tags
echo "\nAvailable branches:"
git branch -a
- 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()