Router for acre #177
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
name: Core | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "core/**" | |
pull_request: | |
defaults: | |
run: | |
working-directory: ./core | |
jobs: | |
core-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "core/.nvmrc" | |
cache: "pnpm" | |
- name: Install Dependencies | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- name: Format | |
run: pnpm run format | |
core-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "core/.nvmrc" | |
cache: "pnpm" | |
- name: Install Dependencies | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- name: Build | |
run: pnpm run build | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: core-build | |
path: | | |
core/build/ | |
core/typechain/ | |
if-no-files-found: error | |
core-slither: | |
needs: [core-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "core/.nvmrc" | |
cache: "pnpm" | |
- name: Install Dependencies | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Slither | |
env: | |
SLITHER_VERSION: 0.9.6 | |
run: pip3 install slither-analyzer==$SLITHER_VERSION | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: core-build | |
path: core/ | |
- name: Run Slither | |
run: slither --hardhat-ignore-compile . | |
core-test: | |
needs: [core-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "core/.nvmrc" | |
cache: "pnpm" | |
- name: Install Dependencies | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: core-build | |
path: core/ | |
- name: Test | |
run: pnpm run test --no-compile | |
core-deploy-dry-run: | |
needs: [core-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "core/.nvmrc" | |
cache: "pnpm" | |
- name: Install Dependencies | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: core-build | |
path: core/ | |
- name: Deploy | |
run: pnpm run deploy --no-compile |