From 7dfd6399c814d542ddc4a466b46696059e07c62c Mon Sep 17 00:00:00 2001 From: Andrei Fajardo Date: Fri, 20 Sep 2024 01:00:52 -0400 Subject: [PATCH] add git actions --- .github/workflows/lint.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..1a8ad35 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,32 @@ +name: Linting +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: get code + uses: actions/checkout@v4 + - name: install poetry + run: pipx install poetry + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: "poetry" + - name: install deps + run: | + poetry env use "3.10" + poetry install --no-interaction + - name: Install pre-commit + shell: bash + run: poetry run pip install pre-commit + - name: lint and format + run: | + poetry run make lint