Fixed CI/CD and .env vars #39
@@ -13,6 +13,8 @@ jobs:
|
|||||||
backend: ${{ steps.filter.outputs.backend }}
|
backend: ${{ steps.filter.outputs.backend }}
|
||||||
frontend: ${{ steps.filter.outputs.frontend }}
|
frontend: ${{ steps.filter.outputs.frontend }}
|
||||||
frontend-mobile: ${{ steps.filter.outputs.frontend-mobile }}
|
frontend-mobile: ${{ steps.filter.outputs.frontend-mobile }}
|
||||||
|
parapharmacy-api: ${{ steps.filter.outputs.parapharmacy-api }}
|
||||||
|
pip-platform: ${{ steps.filter.outputs.pip-platform }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dorny/paths-filter@v3
|
- uses: dorny/paths-filter@v3
|
||||||
@@ -31,6 +33,8 @@ jobs:
|
|||||||
parapharmacy-api:
|
parapharmacy-api:
|
||||||
- 'apps/parapharmacy-api/**'
|
- 'apps/parapharmacy-api/**'
|
||||||
- 'packages/**'
|
- 'packages/**'
|
||||||
|
pip-platform:
|
||||||
|
- 'apps/pip-platform/**'
|
||||||
|
|
||||||
test-backend:
|
test-backend:
|
||||||
name: Backend Tests
|
name: Backend Tests
|
||||||
@@ -95,6 +99,11 @@ jobs:
|
|||||||
if: needs.detect-changes.outputs.parapharmacy-api == 'true'
|
if: needs.detect-changes.outputs.parapharmacy-api == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
services:
|
||||||
|
mongodb:
|
||||||
|
image: mongo:7
|
||||||
|
ports:
|
||||||
|
- 27017:27017
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
@@ -104,27 +113,49 @@ jobs:
|
|||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci --ignore-scripts
|
run: npm ci --ignore-scripts
|
||||||
- name: Install parapharmacy-api native deps
|
|
||||||
run: npm rebuild sqlite3 bcrypt --workspace=farma-clic-parapharmacy-api
|
|
||||||
- name: Run Parapharmacy API Tests
|
- name: Run Parapharmacy API Tests
|
||||||
run: npm test --workspace=farma-clic-parapharmacy-api
|
run: npm test --workspace=farmafinder-parapharmacy-api
|
||||||
|
|
||||||
test-pip-platform:
|
test-pip-platform:
|
||||||
name: PIP Platform Tests
|
name: PIP Platform Tests
|
||||||
needs: detect-changes
|
needs: detect-changes
|
||||||
if: needs.detect-changes.outputs.backend == 'true'
|
if: needs.detect-changes.outputs.pip-platform == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: pip_test
|
||||||
|
POSTGRES_USER: pip
|
||||||
|
POSTGRES_PASSWORD: pip_test
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
options: >-
|
||||||
|
--health-cmd="pg_isready -U pip"
|
||||||
|
--health-interval=10s
|
||||||
|
--health-timeout=5s
|
||||||
|
--health-retries=5
|
||||||
|
redis:
|
||||||
|
image: redis:alpine
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
options: >-
|
||||||
|
--health-cmd="redis-cli ping"
|
||||||
|
--health-interval=10s
|
||||||
|
--health-timeout=5s
|
||||||
|
--health-retries=5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Node.js
|
- name: Setup Python
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
node-version: '22'
|
python-version: '3.13'
|
||||||
cache: 'npm'
|
- name: Install uv
|
||||||
|
run: pip install uv
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci --ignore-scripts
|
working-directory: apps/pip-platform
|
||||||
- name: Install pip-platform native deps
|
run: uv sync --extra dev
|
||||||
run: npm rebuild sqlite3 bcrypt --workspace=farma-clic-pip-platform
|
- name: Run Tests
|
||||||
- name: Run PIP Platform Tests
|
working-directory: apps/pip-platform
|
||||||
run: npm test --workspace=farma-clic-pip-platform
|
run: uv run pytest
|
||||||
|
|||||||
Reference in New Issue
Block a user