main.yml 1.8 KB

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