-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
278 additions
and
125 deletions.
There are no files selected for viewing
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,50 @@ | ||
name: Setup Environment and Dependencies | ||
description: Setup the environment and install dependencies for the project | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Set up Python dependency cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pypoetry | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('pyproject.toml') }}-${{ steps.get_date.outputs.date }} | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
poetry install | ||
- name: Install Dependencies | ||
run: poetry install | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
|
||
- name: Generate Prisma Client | ||
run: poetry run prisma generate | ||
|
||
- name: Set DB URL | ||
run: echo "DATABASE_URL=postgresql://${{ secrets.DB_USER }}:${{ secrets.DB_PASS }}@localhost:5432/${{ secrets.DB_NAME }}" >> $GITHUB_ENV | ||
|
||
- name: Run Database Migrations | ||
run: | | ||
poetry run prisma migrate dev --name updates | ||
- name: Populate Database | ||
run: | | ||
./run populate-db | ||
env: | ||
DB_USER: ${{ secrets.DB_USER }} | ||
DB_PASS: ${{ secrets.DB_PASS }} | ||
DB_NAME: ${{ secrets.DB_NAME }} | ||
DB_PORT: 5432 | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
RUN_ENV: local | ||
PORT: 8080 |
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
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
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
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
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
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
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
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
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
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.