-
Notifications
You must be signed in to change notification settings - Fork 125
111 lines (111 loc) · 3.5 KB
/
publish_and_install.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Publish & Install
on:
push:
branches:
<<<<<<< HEAD
- main
pull_request:
branches:
- main
=======
- master
- major
- minor
- parallel-e2e
pull_request:
branches:
- master
- major
- minor
>>>>>>> 97d9defddefcc7222397dcb6198b998d4ea065e1
defaults:
run:
shell: bash
jobs:
publish_install:
runs-on: ${{ matrix.os }}
strategy:
matrix:
<<<<<<< HEAD
os: [ubuntu-latest]
node-version: [16.x]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
=======
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 16.x]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
>>>>>>> 97d9defddefcc7222397dcb6198b998d4ea065e1
with:
node-version: ${{ matrix.node-version }}
- name: Install Verdaccio
run: |
npm install -g verdaccio
npm install -g verdaccio-auth-memory
npm install -g verdaccio-memory
npm install -g npm-auth-to-token@1.0.0
tmp_registry_log=`mktemp`
mkdir -p $HOME/.config/verdaccio
cp -v ./.github/workflows/verdaccio/config.yaml $HOME/.config/verdaccio/config.yaml
nohup verdaccio --config $HOME/.config/verdaccio/config.yaml &>$tmp_registry_log &
npm-auth-to-token -u test -p test -e test@test.com -r http://0.0.0.0:4873
- name: Windows dependencies
if: matrix.os == 'windows-latest'
run: npm install -g @angular/cli
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
<<<<<<< HEAD
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
=======
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-yarn-
>>>>>>> 97d9defddefcc7222397dcb6198b998d4ea065e1
- name: Yarn install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn config set unsafe-perm true
yarn install --network-timeout 1000000 --prefer-offline
env:
CI: true
- name: Bootstrap
run: yarn bootstrap
env:
CI: true
- name: Publish to Verdaccio
run: |
yarn lerna publish prepatch --preid ci --no-push --no-git-tag-version --no-commit-hooks --force-publish "*" --yes --dist-tag ci --registry http://0.0.0.0:4873
- name: Install via @vendure/create
run: |
mkdir -p $HOME/install
cd $HOME/install
npm set registry=http://0.0.0.0:4873
npm dist-tag ls @vendure/create
npx @vendure/create@ci test-app --ci --use-npm --log-level info
- name: Server smoke tests
run: |
cd $HOME/install/test-app
<<<<<<< HEAD
npm run start &
=======
npm run dev &
>>>>>>> 97d9defddefcc7222397dcb6198b998d4ea065e1
node $GITHUB_WORKSPACE/.github/workflows/scripts/smoke-tests