From 24d42af098cb832e41f872ddca182319b5b8dfd9 Mon Sep 17 00:00:00 2001 From: Adam <41971533+jcadam14@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:25:55 -0500 Subject: [PATCH] Added linter action to .github/workflows --- .github/workflows/linters.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/linters.yml diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml new file mode 100644 index 0000000..46c5d82 --- /dev/null +++ b/.github/workflows/linters.yml @@ -0,0 +1,39 @@ +name: Linters + +on: [push] + +jobs: + black: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.12 + uses: actions/setup-python@v4 + with: + python-version: 3.12 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + poetry config virtualenvs.create false + poetry install --only linters --no-root + - name: Run black + run: | + poetry run black --check . + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.12 + uses: actions/setup-python@v4 + with: + python-version: 3.12 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + poetry config virtualenvs.create false + poetry install --only linters --no-root + - name: Run ruff + run: | + poetry run ruff . \ No newline at end of file