Skip to content

Commit

Permalink
Merge branch 'release-0.2.0' into LCFS-1207-AddFuelCodeCIColumnsFuels…
Browse files Browse the repository at this point in the history
…OtherUse_v2
  • Loading branch information
prv-proton authored Jan 14, 2025
2 parents 8895ee7 + 0132dce commit cc9d106
Show file tree
Hide file tree
Showing 71 changed files with 1,494 additions and 494 deletions.
125 changes: 0 additions & 125 deletions .github/workflows/cypress-auto-test.yaml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Cypress Daily

on:
schedule:
- cron: '0 16 * * *' # Runs daily at 16:00 UTC (8 AM PST)
workflow_dispatch: # Allows manual triggering of the workflow

jobs:
cypress:
runs-on: ubuntu-latest
services:
db:
image: postgres:14.2
env:
POSTGRES_DB: lcfs
POSTGRES_USER: lcfs
POSTGRES_PASSWORD: development_only
ports:
- 5432:5432
redis:
image: bitnami/redis:6.2.5
env:
ALLOW_EMPTY_PASSWORD: "yes"
ports:
- 6379:6379
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
environment:
RABBITMQ_DEFAULT_USER: lcfs
RABBITMQ_DEFAULT_PASS: development_only
RABBITMQ_DEFAULT_VHOST: lcfs
ports:
- "15672:15672"
steps:
- uses: actions/checkout@v2
- name: Build and Run Backend Service
run: |
docker build -t backend-service ./backend/Dockerfile
docker run -d --name backend -e LCFS_DB_HOST=localhost -e LCFS_REDIS_HOST=localhost -p 8000:8000 backend-service
- name: Data Seeding
run: docker exec backend poetry run python /app/lcfs/db/seeders/seed_database.py
- name: Build and Run Frontend Service
run: |
docker build -t frontend-service ./fontend/Dockerfile.dev
docker run -d --name frontend -p 3000:3000 frontend-service
- name: Cypress run
uses: cypress-io/github-action@v2
with:
browser: chrome
wait-on: 'http://localhost:3000'
wait-on-timeout: 60
env:
IDIR_TEST_USER: ${{ secrets.CYPRESS_IDIR_TEST_USER }}
IDIR_TEST_PASS: ${{ secrets.CYPRESS_IDIR_TEST_PASS }}
BCEID_TEST_USER: ${{ secrets.CYPRESS_BCEID_TEST_USER }}
BCEID_TEST_PASS: ${{ secrets.CYPRESS_BCEID_TEST_PASS }}
- name: Cleanup
run: |
docker stop backend frontend
docker rm backend frontend
123 changes: 0 additions & 123 deletions .github/workflows/tests.yml

This file was deleted.

5 changes: 5 additions & 0 deletions backend/lcfs/db/migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@
"mv_director_review_transaction_count",
"mv_org_compliance_report_count",
"transaction_status_view",
"mv_compliance_report_count",
]


def include_object(object, name, type_, reflected, compare_to):
if type_ == "table" and name in exclude_tables:
# Exclude these tables from autogenerate
return False
else:
return True


async def run_migrations_offline() -> None:
"""Run migrations in 'offline' mode.
Expand All @@ -65,6 +68,7 @@ async def run_migrations_offline() -> None:
with context.begin_transaction():
context.run_migrations()


def do_run_migrations(connection: Connection) -> None:
"""
Run actual sync migrations.
Expand All @@ -80,6 +84,7 @@ def do_run_migrations(connection: Connection) -> None:
with context.begin_transaction():
context.run_migrations()


async def run_migrations_online() -> None:
"""
Run migrations in 'online' mode.
Expand Down
Loading

0 comments on commit cc9d106

Please sign in to comment.