test.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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@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. - run: npm test
  20. - name: Verify no unstaged changes
  21. run: __test__/verify-no-unstaged-changes.sh
  22. test:
  23. strategy:
  24. matrix:
  25. runs-on: [ubuntu-latest, macos-latest, windows-latest]
  26. runs-on: ${{ matrix.runs-on }}
  27. steps:
  28. # Clone this repo
  29. - name: Checkout
  30. uses: actions/checkout@v2
  31. # Basic checkout
  32. - name: Basic checkout
  33. uses: ./
  34. with:
  35. ref: test-data/v2/basic
  36. path: basic
  37. - name: Verify basic
  38. shell: bash
  39. run: __test__/verify-basic.sh
  40. # Clean
  41. - name: Modify work tree
  42. shell: bash
  43. run: __test__/modify-work-tree.sh
  44. - name: Clean checkout
  45. uses: ./
  46. with:
  47. ref: test-data/v2/basic
  48. path: basic
  49. - name: Verify clean
  50. shell: bash
  51. run: __test__/verify-clean.sh
  52. # Side by side
  53. - name: Side by side checkout 1
  54. uses: ./
  55. with:
  56. ref: test-data/v2/side-by-side-1
  57. path: side-by-side-1
  58. - name: Side by side checkout 2
  59. uses: ./
  60. with:
  61. ref: test-data/v2/side-by-side-2
  62. path: side-by-side-2
  63. - name: Verify side by side
  64. shell: bash
  65. run: __test__/verify-side-by-side.sh
  66. # LFS
  67. - name: LFS checkout
  68. uses: ./
  69. with:
  70. repository: actions/checkout # hardcoded, otherwise doesn't work from a fork
  71. ref: test-data/v2/lfs
  72. path: lfs
  73. lfs: true
  74. - name: Verify LFS
  75. shell: bash
  76. run: __test__/verify-lfs.sh
  77. test-job-container:
  78. runs-on: ubuntu-latest
  79. container: alpine:latest
  80. steps:
  81. # Clone this repo
  82. - name: Checkout
  83. uses: actions/checkout@v2
  84. # Basic checkout
  85. - name: Basic checkout
  86. uses: ./
  87. with:
  88. ref: test-data/v2/basic
  89. path: basic
  90. - name: Verify basic
  91. run: __test__/verify-basic.sh --archive