chore(repo): promote contracts to root and update CI #9
This file contains hidden or 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
| # 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: 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() |