Migrate package manager to yarn #2340
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: CI | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: | |
branches: | |
- "*" | |
env: | |
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} | |
MNEMONIC_TEST_ACCOUNT: ${{ secrets.MNEMONIC_TEST_ACCOUNT }} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Yarn install | |
uses: ./.github/actions/yarn-nm-install | |
- run: yarn lint | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Yarn install | |
uses: ./.github/actions/yarn-nm-install | |
- run: yarn test | |
# Only run coverage when pushing to master or pull requesting to master | |
coverage: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'pull_request' && github.base_ref == 'master' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Yarn install | |
uses: ./.github/actions/yarn-nm-install | |
- env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
run: npm run coverage | |
- uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# slither: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version-file: ".nvmrc" | |
# - name: Yarn install with node_modules linker | |
# uses: ./.github/actions/yarn-nm-install | |
# - uses: actions/setup-python@v2 | |
# with: | |
# python-version: '3.x' | |
# - run: python -m pip install --upgrade pip | |
# - run: pip3 install slither-analyzer | |
# - run: slither . --exclude-informational --exclude-low --exclude-medium --exclude-optimization |