Skip to content

Yearn

Yearn #5101

Workflow file for this run

name: Yearn
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
paths:
- "yearn/**"
pull_request:
workflow_dispatch:
jobs:
yearn-detect-changes:
runs-on: ubuntu-latest
outputs:
path-filter: ${{ steps.filter.outputs.path-filter }}
steps:
- uses: actions/checkout@v3
if: github.event_name == 'pull_request'
- uses: dorny/paths-filter@v2
if: github.event_name == 'pull_request'
id: filter
with:
filters: |
path-filter:
- './yearn/**'
yearn-build-and-test:
needs: yearn-detect-changes
if: |
github.event_name != 'pull_request'
|| needs.yearn-detect-changes.outputs.path-filter == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./yearn
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14.x"
cache: "yarn"
cache-dependency-path: yearn/yarn.lock
- name: Install dependencies
run: yarn install
- name: Build contracts
run: yarn build
- name: Run system tests
env:
FORKING_URL: ${{ secrets.MAINNET_ETH_HOSTNAME }}
run: yarn test:system
yearn-format:
needs: yearn-detect-changes
if: |
github.event_name == 'push'
|| needs.yearn-detect-changes.outputs.path-filter == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./yearn
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14.x"
cache: "yarn"
cache-dependency-path: yearn/yarn.lock
# Below step is a workaround. Eslint executed in `yearn` directory
# finds `.prettierrc.js` config in the root directory and fails if
# referenced `@keep-network/prettier-config-keep` module is missing.
- name: Install dependencies in the root directory
run: |
cd ..
yarn install --frozen-lockfile
- name: Install dependencies
run: yarn install
- name: Check formatting
run: yarn format