feat: add Filesystem util and load env util (#7487)
This commit is contained in:
132
.github/workflows/test-cli-with-database.yml
vendored
132
.github/workflows/test-cli-with-database.yml
vendored
@@ -1,82 +1,82 @@
|
||||
name: CLI Pipeline
|
||||
on:
|
||||
pull_request:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test-cli-with-database:
|
||||
env:
|
||||
NODE_ENV: CI
|
||||
REDIS_URL: redis://localhost:6379
|
||||
DATABASE_URL: "postgres://postgres:postgres@localhost/cli-test"
|
||||
POSTGRES_URL: "postgres://postgres:postgres@localhost/cli-test"
|
||||
services:
|
||||
redis:
|
||||
image: redis
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 6379:6379
|
||||
test-cli-with-database:
|
||||
env:
|
||||
NODE_ENV: CI
|
||||
REDIS_URL: redis://localhost:6379
|
||||
DATABASE_URL: "postgres://postgres:postgres@localhost/cli-test"
|
||||
POSTGRES_URL: "postgres://postgres:postgres@localhost/cli-test"
|
||||
services:
|
||||
redis:
|
||||
image: redis
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_DB: cli-test
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 5432:5432
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_DB: cli-test
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup development server
|
||||
uses: ./.github/actions/setup-server
|
||||
with:
|
||||
cache-extension: "cli-test"
|
||||
node-version: 18
|
||||
- name: Setup development server
|
||||
uses: ./.github/actions/setup-server
|
||||
with:
|
||||
cache-extension: "cli-test"
|
||||
node-version: 20
|
||||
|
||||
- name: Install Medusa cli
|
||||
run: npm i -g @medusajs/medusa-cli@preview
|
||||
- name: Install Medusa cli
|
||||
run: npm i -g @medusajs/medusa-cli@preview
|
||||
|
||||
- name: Create Medusa project
|
||||
run: |
|
||||
medusa new cli-test --skip-db --v2 --branch feat/v2-ci
|
||||
working-directory: ..
|
||||
- name: Create Medusa project
|
||||
run: |
|
||||
medusa new cli-test --skip-db --v2 --branch feat/v2-ci
|
||||
working-directory: ..
|
||||
|
||||
- name: run medusa dev
|
||||
run: medusa-dev --force-install
|
||||
working-directory: ../cli-test
|
||||
- name: run medusa dev
|
||||
run: medusa-dev --force-install
|
||||
working-directory: ../cli-test
|
||||
|
||||
- name: Run migrations
|
||||
run: medusa migrations run
|
||||
working-directory: ../cli-test
|
||||
- name: Run migrations
|
||||
run: medusa migrations run
|
||||
working-directory: ../cli-test
|
||||
|
||||
- name: Create admin user
|
||||
run: medusa user -e test@test.com -p password -i admin_123
|
||||
working-directory: ../cli-test
|
||||
- name: Create admin user
|
||||
run: medusa user -e test@test.com -p password -i admin_123
|
||||
working-directory: ../cli-test
|
||||
|
||||
- name: Run development server
|
||||
run: medusa develop &
|
||||
working-directory: ../cli-test
|
||||
- name: Run development server
|
||||
run: medusa develop &
|
||||
working-directory: ../cli-test
|
||||
|
||||
- name: Testing development server
|
||||
uses: ./.github/actions/test-server
|
||||
- name: Testing development server
|
||||
uses: ./.github/actions/test-server
|
||||
|
||||
- name: Starting medusa
|
||||
run: medusa start &
|
||||
working-directory: ../cli-test
|
||||
- name: Starting medusa
|
||||
run: medusa start &
|
||||
working-directory: ../cli-test
|
||||
|
||||
- name: Testing server
|
||||
uses: ./.github/actions/test-server
|
||||
- name: Testing server
|
||||
uses: ./.github/actions/test-server
|
||||
|
||||
Reference in New Issue
Block a user