publish_and_install.yml 2.0 KB

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