|
|
@@ -16,6 +16,9 @@ defaults:
|
|
|
shell: bash
|
|
|
jobs:
|
|
|
publish_install:
|
|
|
+ services:
|
|
|
+ verdaccio:
|
|
|
+ image: ./verdaccio/Dockerfile
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
strategy:
|
|
|
matrix:
|
|
|
@@ -33,32 +36,38 @@ jobs:
|
|
|
npm install -g verdaccio
|
|
|
npm install -g wait-on
|
|
|
tmp_registry_log=`mktemp`
|
|
|
- nohup verdaccio &>$tmp_registry_log &
|
|
|
+ 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 &
|
|
|
wait-on http://localhost:4873
|
|
|
TOKEN_RES=$(curl -XPUT \
|
|
|
-H "Content-type: application/json" \
|
|
|
-d '{ "name": "test", "password": "test" }' \
|
|
|
'http://localhost:4873/-/user/org.couchdb.user:test')
|
|
|
TOKEN=$(echo "$TOKEN_RES" | jq -r '.token')
|
|
|
- npm set registry "http://0.0.0.0:4873"
|
|
|
- npm set //0.0.0.0:4873/:_authToken $TOKEN
|
|
|
+ npm set //localhost:4873/:_authToken $TOKEN
|
|
|
- name: Windows dependencies
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
run: npm install -g @angular/cli
|
|
|
- name: Yarn install
|
|
|
run: |
|
|
|
+ npm i -g yarn
|
|
|
yarn config set unsafe-perm true
|
|
|
yarn install --network-timeout 1000000 --prefer-offline
|
|
|
env:
|
|
|
CI: true
|
|
|
- name: Publish to Verdaccio
|
|
|
run: |
|
|
|
+ nohup verdaccio --config $HOME/.config/verdaccio/config.yaml &
|
|
|
+ wait-on http://localhost:4873
|
|
|
yarn lerna publish prepatch --preid ci --no-push --no-git-tag-version --no-commit-hooks --force-publish "*" --yes --dist-tag ci --registry http://localhost:4873
|
|
|
- name: Install via @vendure/create
|
|
|
run: |
|
|
|
mkdir -p $HOME/install
|
|
|
cd $HOME/install
|
|
|
- npm set registry=http://0.0.0.0:4873
|
|
|
+ nohup verdaccio --config $HOME/.config/verdaccio/config.yaml &
|
|
|
+ wait-on http://localhost:4873
|
|
|
+ npm set registry=http://localhost:4873
|
|
|
npm dist-tag ls @vendure/create
|
|
|
npx @vendure/create@ci test-app --ci --use-npm --log-level info
|
|
|
- name: Server smoke tests
|