From b83b85774f7e79e2ed8b76bf76003ba202c3a8e8 Mon Sep 17 00:00:00 2001 From: Muhammad Arslan Date: Sun, 6 Aug 2023 18:42:04 +0500 Subject: [PATCH] Add workflow to run flake8 --- .flake8 | 4 ++++ .github/workflows/flake8.yml | 19 +++++++++++++++++++ pyproject.toml | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .flake8 create mode 100644 .github/workflows/flake8.yml diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..c5bb4bb06 --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +max-line-length = 120 +exclude = tests/* +ignore = E501, E722, W391, F821 \ No newline at end of file diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml new file mode 100644 index 000000000..03ecd0fc2 --- /dev/null +++ b/.github/workflows/flake8.yml @@ -0,0 +1,19 @@ +name: flake8 + +on: + pull_request: {} + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Run flake8 with tox + run: | + pip install tox + tox -e flake8 diff --git a/pyproject.toml b/pyproject.toml index c0b59d454..f6f221004 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,4 +29,4 @@ dependencies = [ postgres = ["psycopg2", "db-dtypes"] bigquery = ["google-auth", "google-cloud-bigquery"] snowflake = ["snowflake-connector-python"] -test = ["tox"] +test = ["tox", "pytest"]