Skip to content

Commit

Permalink
Merge branch 'CarmineOptions:master' into interest-rate-bearing
Browse files Browse the repository at this point in the history
  • Loading branch information
MooreTheAnalyst authored Nov 26, 2024
2 parents 90dc976 + 5e94fc0 commit 4b931cd
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 18 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: CI Workflow

on:
push:
branches:
- master
pull_request:
branches:
- master
on: [push, pull_request]


jobs:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: Pylint Check

on:
push:
branches:
- master
pull_request:
branches:
- master
on: [push, pull_request]

jobs:
lint:
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/wep_app_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Web App CI Workflow

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
run_tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5433:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies for Web_App
working-directory: ./apps/web_app
run: |
echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
poetry lock --no-update
poetry install
- name: Run Tests for Web_App
working-directory: ./apps/web_app
run: |
cp .env.test .env
poetry run pytest --junitxml=results.xml
- name: Upload Test Results
uses: actions/upload-artifact@v3
with:
name: test-results
path: ./apps/web_app/results.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ class CollateralEnabledDisabledEventData(BaseModel):
Attributes:
user: The user address for whom collateral is being enabled/disabled.
token: The token address being enabled/disabled as collateral.
enabled: Boolean indicating if collateral is being enabled (True) or disabled (False).
"""

user: str
token: str
enabled: bool
3 changes: 1 addition & 2 deletions apps/data_handler/tests/test_zklend_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,9 @@ def test_save_collateral_enabled_event(transformer, sample_collateral_enabled_ev
Test saving a collateral enabled event.
"""
transformer.api_connector.get_data.return_value = [sample_collateral_enabled_event_data]

expected_parsed_data = CollateralEnabledDisabledEventData(
user=sample_collateral_enabled_event_data['data'][0],
token=sample_collateral_enabled_event_data['data'][1]
token=sample_collateral_enabled_event_data['data'][1],
)

transformer.fetch_and_transform_events(
Expand Down
10 changes: 10 additions & 0 deletions apps/web_app/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
DB_NAME=#
DB_USER=#
DB_PASSWORD=#
DB_HOST=db
DB_PORT=#
IP_INFO_TOKEN=#
TELEGRAM_TOKEN= # token telegram from botfather
REDIS_HOST=redis
REDIS_PORT=6379
DATA_HANDLER_URL=# url to data handler

0 comments on commit 4b931cd

Please sign in to comment.