Skip to content

Commit

Permalink
update email reminder ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tshyun24 committed Jan 29, 2024
1 parent 1b2c95f commit 008cbc0
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 39 deletions.
84 changes: 46 additions & 38 deletions .github/workflows/business-email-reminder-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,48 @@ on:
types: [assigned, synchronize]
paths:
- "jobs/email-reminder/**"
workflow_dispatch:

defaults:
run:
shell: bash
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
Expand All @@ -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"
42 changes: 41 additions & 1 deletion jobs/email-reminder/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,51 @@ google-auth = "^2.21.0"
google-cloud-pubsub = "^2.17.1"
pg8000 = "^1.29.8"

[tool.poetry.group.dev.dependencies]
[tool.poetry.group.test.dependencies]
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"
11 changes: 11 additions & 0 deletions legal-api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 008cbc0

Please sign in to comment.