Files
medusa-store/.github/workflows/action.yml
Zakaria El Asri 2e384842d5 feat: medusa-react admin hooks (#978)
* add: medusa admin hooks + tests

* fix: remove unneeded props

* fix: deps

* fix: deps

* fix: deps

* fix: failing tests

* fix: failing tests

* fix: query key

* add: yarn workspaces

* fix: linting medusa-react

* fix: add prepare script

* fix: buildOptions

* fix: useAdminShippingOptions query

* fix: use qs instead for query params (#1019)

* fix: formatting

* debug: ci pipeline

* debug: log node_modules structure

* debug: use lerna bootstrap

* debug: update node version

* debug: print pkgs in workspace

* debug: print pkgs in workspace

* debug: print pkgs in workspace

* debug: print pkgs in workspace

* debug: add explicit build step

* fix: jsdoc

* debug: run build step

* debug: fix build errors

* debug: add build step to integration tests

* fix: failing test

* cleanup

Co-authored-by: Sebastian Rindom <seb@medusajs.com>
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2022-02-02 17:10:56 +01:00

98 lines
2.3 KiB
YAML

name: Medusa Pipeline
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2.3.5
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v2.4.1
with:
node-version: "14"
cache: "yarn"
- name: Assert changed
run: ./scripts/assert-changed-files-actions.sh "packages"
- name: Bootstrap packages
uses: ./.github/actions/cache-bootstrap
with:
extension: unit-tests
- name: Build Packages
run: yarn build
- name: Run unit tests
run: yarn test
integration-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2.3.5
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v2.4.1
with:
node-version: "14"
cache: "yarn"
- name: Bootstrap packages
uses: ./.github/actions/cache-bootstrap
with:
extension: integration-tests
- name: Build Packages
run: lerna run build
- name: Install dev cli
run: sudo npm i -g medusa-dev-cli
- name: Set path to medusa repo
run: medusa-dev --set-path-to-repo `pwd`
- name: Force install
run: medusa-dev --force-install
working-directory: integration-tests/api
- name: Build integration tests
run: yarn build
working-directory: integration-tests/api
- name: Run integration tests
run: yarn test:integration --maxWorkers=50% --silent=false
env:
DB_PASSWORD: postgres