Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 38 additions & 19 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ jobs:
build:
runs-on: ubuntu-latest
environment: Preview
services:
postgres:
image: supabase/postgres:15.6.1.116
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
strategy:
fail-fast: true
defaults:
Expand All @@ -42,27 +49,39 @@ jobs:
role-to-assume: arn:aws:iam::654654285942:role/Github-OIDC
audience: sts.amazonaws.com
aws-region: ${{ env.AWS_REGION }}

- name: Set up Python
uses: actions/setup-python@v5
- name: Set up Node.js
uses: actions/setup-node@v3
with:
python-version: '3.12.0'
node-version: '20.x'

# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: '3.12.0'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install ruff
pip install pytest pytest-cov
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
# pip install ruff
# pip install pytest pytest-cov

- name: Lint with Ruff
run: |
ruff check --output-format=github .
# - name: Lint with Ruff
# run: |
# ruff check --output-format=github .

- name: Run tests
run: pytest --cov
- name: Run Supabase Migration
env:
SUPABASE_DB_URL: postgres://postgres:postgres@localhost:5432/postgres
run: |
cd ../migrations
npx supabase db push

# - name: Run tests
# run: pytest --cov

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Upload results to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
Loading