publish_and_install.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: Publish & Install
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. branches:
  8. - master
  9. defaults:
  10. run:
  11. shell: bash
  12. jobs:
  13. publish_install:
  14. runs-on: ${{ matrix.os }}
  15. strategy:
  16. matrix:
  17. os: [ubuntu-latest, windows-latest, macos-latest]
  18. node-version: [12.x, 14.x]
  19. fail-fast: false
  20. steps:
  21. - uses: actions/checkout@v2
  22. - name: Use Node.js ${{ matrix.node-version }}
  23. uses: actions/setup-node@v1
  24. with:
  25. node-version: ${{ matrix.node-version }}
  26. - name: Install Verdaccio
  27. run: |
  28. npm install -g verdaccio
  29. npm install -g verdaccio-auth-memory
  30. npm install -g verdaccio-memory
  31. npm install -g npm-auth-to-token@1.0.0
  32. tmp_registry_log=`mktemp`
  33. mkdir -p $HOME/.config/verdaccio
  34. cp -v ./.github/workflows/verdaccio/config.yaml $HOME/.config/verdaccio/config.yaml
  35. nohup verdaccio --config $HOME/.config/verdaccio/config.yaml &>$tmp_registry_log &
  36. npm-auth-to-token -u test -p test -e test@test.com -r http://0.0.0.0:4873
  37. - name: Windows dependencies
  38. if: matrix.os == 'windows-latest'
  39. run: npm install -g @angular/cli
  40. - name: Install & bootstrap
  41. run: |
  42. yarn config set unsafe-perm true
  43. yarn install --network-timeout 1000000
  44. yarn bootstrap
  45. env:
  46. CI: true
  47. - name: Publish to Verdaccio
  48. run: |
  49. 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
  50. - name: Install via @vendure/create
  51. run: |
  52. mkdir -p $HOME/install
  53. cd $HOME/install
  54. npm set registry=http://0.0.0.0:4873
  55. npm dist-tag ls @vendure/create
  56. npx @vendure/create@ci test-app --ci --use-npm --log-level info
  57. - name: Server smoke tests
  58. run: |
  59. cd $HOME/install/test-app
  60. npm run start &
  61. node $GITHUB_WORKSPACE/.github/workflows/scripts/smoke-tests