Files
foundry/.github/workflows/lint_trunk.yaml
Rachel Clune 76e61e0c2d docs: update RFD3 README (#714)
* Added more explanation and fixed small issues in demo commands in RFD3 README

* fix github actions grepping ruff

---------

Co-authored-by: Rohith Krishna <rohith@localhost>
2025-12-02 16:42:04 -08:00

36 lines
1.2 KiB
YAML

name: lint_trunk
on:
push:
branches: [main, trunk, wip/for-release, wip/remove-chemdata]
pull_request:
branches: [main, trunk, wip/for-release, wip/remove-chemdata]
pull_request_target:
types: [ready_for_review]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: ruff (check code style)
# NOTE: We use an ubuntu runner to not be dependent on possibly limited digs infra
# for this tiny linting job. This means we can have many lint jobs accross repos in parallel.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
- name: Extract ruff version from requirements.txt
run: |
echo "RUFF_VERSION=$(grep 'ruff==' pyproject.toml | sed 's/.*ruff==\(.*\)/\1/')" >> $GITHUB_ENV
- name: Install ruff
run: pip install ruff==${{ env.RUFF_VERSION }}
- name: Ruff format
run: ruff format --diff src tests scripts notebooks
- name: Ruff check
run: ruff check src tests scripts notebooks