Update README.md #1594
This file contains 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
# workflow pipeline | |
name: Test | |
on: ["push", "pull_request"] | |
jobs: | |
hardhat-test: | |
runs-on: ubuntu-latest | |
env: | |
AVAX_API: https://api.avax.network/ext/bc/C/rpc | |
ALCHEMY_API: ${{ secrets.ALCHEMY_API }} | |
DD_ENV: ci | |
steps: | |
- name: Datadog Agent | |
uses: DataDog/agent-github-action@v1 | |
with: | |
api_key: ${{ secrets.DD_API_KEY }} | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{github.event.pull_request.head.ref}} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
- name: Read .nvmrc | |
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
id: nvm | |
- name: Use Node.js (.nvmrc) | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
- name: Install and Compile | |
run: | | |
npm install | |
npm run build | |
- name: Test | |
run: | | |
npm run test | |
foundry-base: | |
runs-on: ubuntu-latest | |
env: | |
FOUNDRY_FUZZ_RUNS: 2000 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Installing dependencies | |
run: npm install | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Run tests | |
run: ./scripts/foundry-base.sh | |
foundry-fork: | |
runs-on: ubuntu-latest | |
env: | |
ALCHEMY_API: ${{ secrets.ALCHEMY_API }} | |
ARBITRUM_API: ${{ secrets.ARBITRUM_API }} | |
AVAX_API: https://api.avax.network/ext/bc/C/rpc | |
MOVR_API: https://moonriver.api.onfinality.io/public | |
OPTIMISM_API: ${{ secrets.OPTIMISM_API }} | |
KLAY_API: https://public-node-api.klaytnapi.com/v1/cypress | |
CANTO_API: https://canto.slingshot.finance | |
FOUNDRY_FUZZ_RUNS: 64 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Installing dependencies | |
run: npm install | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Run tests | |
run: ./scripts/foundry-fork.sh |