nodejs.yml 781 B

12345678910111213141516171819202122232425262728
  1. name: Node CI
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. runs-on: ubuntu-latest
  6. strategy:
  7. matrix:
  8. node-version: [4.x, 6.x, 8.x, 10.x, 12.x, 14.x, 16.x, 17.x, 18.x]
  9. fail-fast: false
  10. steps:
  11. - uses: actions/checkout@v1
  12. - name: Use Node.js ${{ matrix.node-version }}
  13. uses: actions/setup-node@v1
  14. with:
  15. node-version: ${{ matrix.node-version }}
  16. - name: npm install, build, and test
  17. run: |
  18. npm install
  19. mkdir -p test/keys
  20. openssl genrsa -out test/keys/ssl.key 2048
  21. openssl req -new -key test/keys/ssl.key -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -x509 -days 999 -out test/keys/ssl.cert
  22. npm run build --if-present
  23. npm test
  24. env:
  25. CI: true