test.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. name: Build and Test
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - master
  7. - releases/*
  8. jobs:
  9. build:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v1 # todo: switch to v2
  13. - run: npm ci
  14. - run: npm run build
  15. - run: npm run format-check
  16. - run: npm run lint
  17. - run: npm run pack
  18. - run: npm run gendocs
  19. - name: Verify no unstaged changes
  20. run: __test__/verify-no-unstaged-changes.sh
  21. test:
  22. strategy:
  23. matrix:
  24. runs-on: [ubuntu-latest, macos-latest, windows-latest]
  25. runs-on: ${{ matrix.runs-on }}
  26. steps:
  27. # Clone this repo
  28. - name: Checkout
  29. uses: actions/checkout@v1 # todo: switch to V2
  30. # Basic checkout
  31. - name: Basic checkout
  32. uses: ./
  33. with:
  34. ref: test-data/v2/basic
  35. path: basic
  36. - name: Verify basic
  37. shell: bash
  38. run: __test__/verify-basic.sh
  39. # Clean
  40. - name: Modify work tree
  41. shell: bash
  42. run: __test__/modify-work-tree.sh
  43. - name: Clean checkout
  44. uses: ./
  45. with:
  46. ref: test-data/v2/basic
  47. path: basic
  48. - name: Verify clean
  49. shell: bash
  50. run: __test__/verify-clean.sh
  51. # Side by side
  52. - name: Side by side checkout 1
  53. uses: ./
  54. with:
  55. ref: test-data/v2/side-by-side-1
  56. path: side-by-side-1
  57. - name: Side by side checkout 2
  58. uses: ./
  59. with:
  60. ref: test-data/v2/side-by-side-2
  61. path: side-by-side-2
  62. - name: Verify side by side
  63. shell: bash
  64. run: __test__/verify-side-by-side.sh
  65. # LFS
  66. - name: LFS checkout
  67. uses: ./
  68. with:
  69. repository: actions/checkout # hardcoded, otherwise doesn't work from a fork
  70. ref: test-data/v2/lfs
  71. path: lfs
  72. lfs: true
  73. - name: Verify LFS
  74. shell: bash
  75. run: __test__/verify-lfs.sh