pr_push_checks_node.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: Node PR Checks
  2. on:
  3. pull_request:
  4. paths:
  5. - 'dashboard/*'
  6. - '.github/workflows/pr_push_checks_node.yaml'
  7. concurrency:
  8. group: pr-node-${{ github.event.pull_request.number || github.ref }}
  9. cancel-in-progress: true
  10. jobs:
  11. build-npm:
  12. name: Running smoke test npm build
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Checkout code
  16. uses: actions/checkout@v3
  17. - name: Setup Node
  18. uses: actions/setup-node@v3
  19. with:
  20. node-version: 16
  21. - name: Setup NPM
  22. working-directory: dashboard
  23. run: |
  24. # installing updated npm
  25. # Verify npm works before capturing and ensure its stderr is inspectable later
  26. version="$(jq -r '.engines.npm' package.json)"
  27. npm --version 2>&1 1>/dev/null
  28. npm_version="$(npm --version)"
  29. echo "Bootstrapping npm $version (replacing $npm_version)..."
  30. npm install --unsafe-perm -g --quiet "npm@$version"
  31. # Verify npm works before capturing and ensure its stderr is inspectable later
  32. npm --version 2>&1 1>/dev/null
  33. echo "npm $(npm --version) installed"
  34. - name: Install NPM Dependencies
  35. working-directory: dashboard
  36. run: |
  37. npm i --legacy-peer-deps
  38. - name: Run NPM Build
  39. working-directory: dashboard
  40. run: |
  41. npm run build