-
-
Notifications
You must be signed in to change notification settings - Fork 40
78 lines (69 loc) · 1.76 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Tests pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-verion: [16.x]
medusajs-version: [1.7.x]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-verion }}
- name: 'install deps'
run: npm i
- name: 'run unit tests'
run: npm run test:ci --legacy-peer-deps
env:
MEDUSAJS_VERSION: ${{ matrix.medusajs-version }}
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-verion: [16.x]
medusajs-version: [1.7.x]
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: medusa-extender
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-verion }}
- name: 'run integration tests'
run: npm run test:integration:ci
env:
MEDUSAJS_VERSION: ${{ matrix.medusajs-version }}
DB_PASSWORD: postgres
IS_CI: true