tests.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Tests
  2. on: [workflow_call]
  3. defaults:
  4. run:
  5. shell: 'bash'
  6. jobs:
  7. unit:
  8. strategy:
  9. fail-fast: false
  10. matrix:
  11. os: [ windows-latest, ubuntu-latest, macos-latest ]
  12. package: [ main, preload, renderer ]
  13. runs-on: ${{ matrix.os }}
  14. steps:
  15. - uses: actions/checkout@v3
  16. - uses: actions/setup-node@v3
  17. with:
  18. node-version: 16
  19. cache: 'npm'
  20. - run: npm ci
  21. - run: npm run test:${{ matrix.package }} --if-present
  22. e2e:
  23. strategy:
  24. fail-fast: false
  25. matrix:
  26. os: [ windows-latest, ubuntu-latest, macos-latest ]
  27. runs-on: ${{ matrix.os }}
  28. steps:
  29. - uses: actions/checkout@v3
  30. - uses: actions/setup-node@v3
  31. with:
  32. node-version: 16
  33. cache: 'npm'
  34. - run: npm ci
  35. - run: npx playwright install --with-deps
  36. - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e --if-present
  37. if: matrix.os == 'ubuntu-latest'
  38. - run: npm run test:e2e --if-present
  39. if: matrix.os != 'ubuntu-latest'