companion.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. name: Companion
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. name: Unit tests
  6. runs-on: ubuntu-latest
  7. strategy:
  8. matrix:
  9. node-version: [10.20.1, 12.x, 14.x, 16.x, 17.x]
  10. steps:
  11. - name: Checkout sources
  12. uses: actions/checkout@v2
  13. - name: Cache npm dependencies
  14. id: cache-npm-libraries
  15. uses: actions/cache@v2
  16. with:
  17. path: .yarn/cache/*
  18. key: ${{ runner.os }}
  19. - name: Install Node.js
  20. uses: actions/setup-node@v2
  21. with:
  22. node-version: ${{matrix.node-version}}
  23. - name: Install Corepack if needed
  24. run: corepack -v || npm install -g corepack
  25. - name: Install dependencies
  26. run: corepack yarn install --immutable
  27. env:
  28. # Necessary for Node.js v10.x
  29. NODE_OPTIONS: --experimental-worker
  30. YARN_IGNORE_NODE: 1
  31. - name: Run tests
  32. run: corepack yarn run test:companion
  33. env:
  34. # Necessary for Node.js v10.x
  35. NODE_OPTIONS: --experimental-worker
  36. YARN_IGNORE_NODE: 1