* added initial foundry transformERC20 tests * added foundry tests into CircleCI flow * add verbosity for failing tests in CI * revert wrong CI commands * feat: Foundry, added some more deployments (#558) * Added some more deployments * Rename WETH9 to WETH9V06 * Set to 0.6.x * fix typo * remove commit with bad prettier changes * working bridge Fills through weth transformer * remove unused reference * clean up tests * added working otc fill through transformERC20 in FQT * resolve file imports, add samplers, arbitrumBridgeAdatper, and new FQT version * add extra 'v' for debugging verbosity * add extra 'v' for debugging verbosity in circleci config * remove old traces * refactor rpc's out of foundry.toml and into .env for CI compatibility * remove verbosity from CI command as its now defined in foundry.toml * setup rpc's * ignore foundry artifacts in prettier * change naming in prettierignore * move /samplers to the tests subdirectory, modify remappings to reflext change * one more try 🤞 * change CI steps * remove yarn from CI step * get to the right directory * update foundry before tests * fix tip() deprecation and use deal() * use deal() instead of vm.deal() * try to get foundry to have the right directory structure by updating it * I HATE THIS * remove foundryup * Fix prettier issues * Remove obsoleted import * Use forge native commands to install deps and test and add the --root option * Try using forge with working-directory flag in CI * Use nightly foundry docker image * Update rpc endpoints config in foundry * move tests into /forked and /local * rename tests * add foundry profiles to CI * try to fix CI * 🔧 add foundry local and forked tests to workflow * prettier and lint * revert deps update * remove all samplers and add uniswapV2 sampler to ForkUtils * address jacobs comments * cleanup and comment * prettier and lint * bump contracts-zero-ex version * set func-name-mixedcase to off in solhint for elenas new changes * max line length to warn * add --fix for check-md * Update ci.yml * fix some nitpcks and leftover code * fix inconsistent naming * fix bridge adapter reverts and foundry cache * migrate foundry integration tests to /tests * refactor contract-addresses to use the contract-addresses package style nested json * fix solhint * fix contract linting errors * dont check broken links in libraries * move forge order in gh action for testing * add env instead of vars * try again * fix github actions ordering * update licence and address comments * remove verbosity from foundry.toml * fix contract lint * move back to emitting an event until samplers can be integrated as some chains dont have uniswap as a source * add uniswap v3 sampling code for future use * remove uniswap v3 code as its not used * fix lint Co-authored-by: Noah Khamliche <0xnoah@Noahs-MacBook-Pro-2.local> Co-authored-by: Jacob Evans <jacob@dekz.net> Co-authored-by: elenadimitrova <elena@arenabg.com>
109 lines
3.0 KiB
YAML
109 lines
3.0 KiB
YAML
name: Continuous Integration
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- development
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "16"
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Build solution
|
|
run: yarn build
|
|
|
|
- name: Lint typescript
|
|
run: yarn lint:ts
|
|
|
|
- name: Lint solidity
|
|
run: yarn lint:contracts
|
|
|
|
- name: Run prettier
|
|
run: yarn prettier:ci
|
|
|
|
- name: Check dependent packages have consistent versions
|
|
run: yarn deps_versions:ci
|
|
|
|
- name: Check diff in docs
|
|
run: yarn diff_md_docs:ci
|
|
|
|
- name: Check for broken links in markdown files
|
|
run: yarn test:links
|
|
|
|
- name: Test doc generation
|
|
run: yarn test:generate_docs:ci
|
|
|
|
- name: Test @0x/contracts-*
|
|
run: |
|
|
yarn wsrun \
|
|
-p @0x/contracts-multisig \
|
|
-p @0x/contracts-utils \
|
|
-p @0x/contracts-exchange-libs \
|
|
-p @0x/contracts-erc20 \
|
|
-p @0x/contracts-erc721 \
|
|
-p @0x/contracts-erc1155 \
|
|
-p @0x/contracts-asset-proxy \
|
|
-p @0x/contracts-broker \
|
|
-p @0x/contracts-zero-ex \
|
|
-m --serial -c test:ci
|
|
|
|
- name: Test local @0x/contracts-*
|
|
run: |
|
|
yarn wsrun \
|
|
-p @0x/contracts-test-utils \
|
|
-p @0x/contract-addresses \
|
|
-p @0x/contract-artifacts \
|
|
-p @0x/contract-wrappers-test \
|
|
-p @0x/order-utils \
|
|
-m --serial -c test:ci
|
|
|
|
- name: Add foundry
|
|
uses: foundry-rs/foundry-toolchain@v1
|
|
with:
|
|
version: nightly
|
|
|
|
- name: Run Forge build
|
|
working-directory: contracts/zero-ex
|
|
run: |
|
|
forge --version
|
|
forge build --sizes
|
|
|
|
- name: Run Forge tests
|
|
working-directory: contracts/zero-ex
|
|
env:
|
|
ARBITRUM_RPC_URL: ${{ secrets.ARBITRUM_RPC_URL }}
|
|
AVALANCHE_RPC_URL: ${{ secrets.AVALANCHE_RPC_URL }}
|
|
BSC_RPC_URL: ${{ secrets.BSC_RPC_URL }}
|
|
FANTOM_RPC_URL: ${{ secrets.FANTOM_RPC_URL }}
|
|
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
|
|
OPTIMISM_RPC_URL: ${{ secrets.OPTIMISM_RPC_URL }}
|
|
POLYGON_RPC_URL: ${{ secrets.POLYGON_RPC_URL }}
|
|
run: |
|
|
forge test -vvv --gas-report
|
|
|
|
- name: Run Forge coverage
|
|
working-directory: contracts/zero-ex
|
|
run: |
|
|
forge coverage --report lcov
|
|
|
|
- name: Upload the coverage report to Coveralls
|
|
uses: coverallsapp/github-action@master
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
base-path: ./contracts/zero-ex/
|
|
path-to-lcov: ./contracts/zero-ex/lcov.info
|