Skip to content

chore: add makefile and run format and lint #815

chore: add makefile and run format and lint

chore: add makefile and run format and lint #815

Workflow file for this run

name: Lint
on: [pull_request]
jobs:
lint-coinbase-agentkit-python:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./python/coinbase-agentkit
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: ./python/coinbase-agentkit/.venv
key: venv-agentkit-${{ runner.os }}-${{ hashFiles('python/coinbase-agentkit/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --with dev
- name: Run linters
run: poetry run make lint
# lint-cdp-langchain-python:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./python/cdp-langchain
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Install Poetry
# uses: snok/install-poetry@v1
# with:
# version: latest
# virtualenvs-create: true
# virtualenvs-in-project: true
# - name: Load cached venv
# id: cached-poetry-dependencies
# uses: actions/cache@v3
# with:
# path: ./python/cdp-langchain/.venv
# key: venv-langchain-${{ runner.os }}-${{ hashFiles('python/cdp-langchain/poetry.lock') }}
# - name: Install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
# run: poetry install --with dev
# - name: Run linters
# run: poetry run make lint
# lint-twitter-langchain-python:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./python/twitter-langchain
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Install Poetry
# uses: snok/install-poetry@v1
# with:
# version: latest
# virtualenvs-create: true
# virtualenvs-in-project: true
# - name: Load cached venv
# id: cached-poetry-dependencies
# uses: actions/cache@v3
# with:
# path: ./python/twitter-langchain/.venv
# key: venv-twitter-langchain-${{ runner.os }}-${{ hashFiles('python/twitter-langchain/poetry.lock') }}
# - name: Install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
# run: poetry install --with dev
# - name: Run linters
# run: poetry run make lint
lint-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
# Install dependencies in parent directory first
- run: npm install
# formatting/lint in working directory
- name: Check formatting/lint
run: |
npm run format:check
npm run lint