main.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. name: Actions
  2. on: [push, pull_request]
  3. jobs:
  4. # Building and testing Java with Maven
  5. # https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven
  6. Litemall-all:
  7. runs-on: ubuntu-latest
  8. strategy:
  9. matrix:
  10. java-version:
  11. - 8
  12. - 11
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: Set up JDK ${{ matrix.java-version }}
  16. uses: actions/setup-java@v2
  17. with:
  18. java-version: ${{ matrix.java-version }}
  19. distribution: adopt
  20. - name: Cache Maven packages
  21. uses: actions/cache@v2
  22. with:
  23. path: ~/.m2
  24. key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
  25. restore-keys: ${{ runner.os }}-m2
  26. - name: Build with Maven
  27. run: mvn --batch-mode --update-snapshots verify
  28. # Building and testing Node.js
  29. # https://docs.github.com/en/actions/guides/building-and-testing-nodejs
  30. Litemall-admin:
  31. runs-on: ubuntu-latest
  32. strategy:
  33. matrix:
  34. node-version:
  35. - 10.x
  36. - 12.x
  37. - 14.x
  38. # - 15.x
  39. steps:
  40. - uses: actions/checkout@v2
  41. - name: Use Node.js ${{ matrix.node-version }}
  42. uses: actions/setup-node@v1
  43. with:
  44. node-version: ${{ matrix.node-version }}
  45. - run: npm --prefix litemall-admin install
  46. - run: npm --prefix litemall-admin run test
  47. Litemall-vue:
  48. runs-on: ubuntu-latest
  49. strategy:
  50. matrix:
  51. node-version:
  52. - 10.x
  53. - 12.x
  54. - 14.x
  55. # - 15.x
  56. steps:
  57. - uses: actions/checkout@v2
  58. - name: Use Node.js ${{ matrix.node-version }}
  59. uses: actions/setup-node@v1
  60. with:
  61. node-version: ${{ matrix.node-version }}
  62. - run: npm --prefix litemall-vue install
  63. - run: npm --prefix litemall-vue run test