From fd76cfb826cb0f19f86542d97d8d6f16e267976c Mon Sep 17 00:00:00 2001 From: Joaquin Dominguez <83036592+j-dominguez9@users.noreply.github.com> Date: Tue, 4 Jun 2024 14:51:04 -0400 Subject: [PATCH] added github action for CI linting and formatting (#4) * Create ruff.yml CI check for linting * updated ruff config --- .github/workflows/ruff.yml | 12 ++++++++++++ pyproject.toml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..ea31e1c --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,12 @@ +name: Ruff +on: [ push, pull_request ] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 + with: + version: 0.4.4 + args: check + src: "./src" diff --git a/pyproject.toml b/pyproject.toml index 8b5ae01..db621f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,7 +94,7 @@ lines-after-imports = 2 known-first-party = ["translation-agent"] [tool.ruff.lint.per-file-ignores] -"__init__.py" = ["E402"] +"**/__init__.py" = ["E402", "F401"] "**/{tests,docs,tools}/*" = ["E402"]