-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-0.2.0' into feat/daniel-add-cr-transactions-1668
- Loading branch information
Showing
46 changed files
with
686 additions
and
341 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
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 | ||
env: | ||
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 -f ./backend/Dockerfile ./backend | ||
docker run -d --name backend \ | ||
--network=host \ | ||
-e LCFS_DB_HOST=localhost \ | ||
-e LCFS_REDIS_HOST=localhost \ | ||
backend-service | ||
- name: Wait for DB to be Ready | ||
run: sleep 20 | ||
|
||
- name: Run Alembic Migrations | ||
run: docker exec backend poetry run alembic upgrade head | ||
|
||
- 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 -f ./frontend/Dockerfile.dev ./frontend | ||
docker run -d --name frontend \ | ||
--network=host \ | ||
frontend-service | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
browser: chrome | ||
wait-on: 'http://localhost:3000' | ||
wait-on-timeout: 60 | ||
record: false | ||
config-file: cypress.config.js | ||
working-directory: frontend | ||
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 | ||
if: always() | ||
run: | | ||
docker stop backend frontend | ||
docker rm backend frontend |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.