diff --git a/.github/workflows/business-email-reminder-ci.yml b/.github/workflows/business-email-reminder-ci.yml index fcaf4a021b..3a0fb042d5 100644 --- a/.github/workflows/business-email-reminder-ci.yml +++ b/.github/workflows/business-email-reminder-ci.yml @@ -5,6 +5,7 @@ on: types: [assigned, synchronize] paths: - "jobs/email-reminder/**" + workflow_dispatch: defaults: run: @@ -12,40 +13,40 @@ defaults: working-directory: ./jobs/email-reminder jobs: - setup-job: - runs-on: ubuntu-20.04 + # setup-job: + # runs-on: ubuntu-20.04 - if: github.repository == 'bcgov/lear' + # if: github.repository == 'bcgov/lear' - steps: - - uses: actions/checkout@v3 - - run: "true" + # steps: + # - uses: actions/checkout@v3 + # - run: "true" - linting: - needs: setup-job - runs-on: ubuntu-20.04 + # linting: + # needs: setup-job + # runs-on: ubuntu-20.04 - strategy: - matrix: - python-version: [3.8] + # strategy: + # matrix: + # python-version: [3.8] - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - make setup - - name: Lint with pylint - id: pylint - run: | - make pylint - - name: Lint with flake8 - id: flake8 - run: | - make flake8 + # steps: + # - uses: actions/checkout@v3 + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v1 + # with: + # python-version: ${{ matrix.python-version }} + # - name: Install dependencies + # run: | + # make setup + # - name: Lint with pylint + # id: pylint + # run: | + # make pylint + # - name: Lint with flake8 + # id: flake8 + # run: | + # make flake8 # testing: # needs: setup-job @@ -64,13 +65,20 @@ jobs: # run: | # make test - build-check: - needs: setup-job - runs-on: ubuntu-20.04 + # build-check: + # needs: setup-job + # runs-on: ubuntu-20.04 + + # steps: + # - uses: actions/checkout@v3 + # - name: build to check strictness + # id: build + # run: | + # make build-nc - steps: - - uses: actions/checkout@v3 - - name: build to check strictness - id: build - run: | - make build-nc + business-email-reminder-ci: + uses: bcgov/bcregistry-sre/.github/workflows/api-ci.yaml@main + with: + app_name: "business-email-reminder" + working_directory: "./jobs/email-reminder" + codecov_flag: "emailreminder" diff --git a/jobs/email-reminder/pyproject.toml b/jobs/email-reminder/pyproject.toml index cffe2ca5e7..736f222460 100644 --- a/jobs/email-reminder/pyproject.toml +++ b/jobs/email-reminder/pyproject.toml @@ -44,6 +44,46 @@ pytest = "^7.4.0" pytest-mock = "^3.11.1" black = "^23.3.0" +[tool.poetry.group.dev.dependencies] +black = "^23.12.1" +pylint = "^3.0.3" +bandit = "^1.7.6" +flake8-pyproject = "^1.2.3" +isort = "^5.13.2" + +[tool.bandit] +exclude_dirs = [".venv","tests"] +skips = ["B104"] + +[tool.flake8] +ignore = ["F401","E402", "Q000", "E203", "W503", "W504" ] +exclude = [ + ".venv", + ".git", + "*migrations*" +] +per-file-ignores = [ + "__init__.py:F401", + "*.py:B902" +] +max-line-length = 120 +docstring-min-length=10 +count = true + +[tool.black] +line-length = 120 + +[tool.isort] +profile = "black" + +[tool.pylint.'MESSAGES CONTROL'] +ignore = [ "migrations", "test"] +notes = ["FIXME","XXX","TODO"] +ignored-modules= ["flask_sqlalchemy", "sqlalchemy", "SQLAlchemy" , "alembic", "scoped_session"] +ignored-classes= "scoped_session" +disable = "C0209,C0301,W0511,W0613,W0703,W1514,R0801,R0902,R0903,R0911,R0401,R1705,R1718,W3101" +extension-pkg-whitelist = "pydantic" + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"