You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.3 KiB

  1. name: gin-vue-admin build test
  2. on:
  3. push:
  4. branches:
  5. - '*'
  6. paths-ignore:
  7. - './db/**'
  8. pull_request:
  9. branches:
  10. - '*'
  11. paths-ignore:
  12. - './db/**'
  13. - '**.md'
  14. jobs:
  15. frontend:
  16. name: Frontend build
  17. runs-on: ubuntu-latest
  18. strategy:
  19. matrix:
  20. node-version: [12.x]
  21. steps:
  22. - name: Check out branch
  23. uses: actions/checkout@v2
  24. - name: Use Node.js ${{ matrix.node-version }}
  25. uses: actions/setup-node@v1
  26. with:
  27. node-version: ${{ matrix.node-version }}
  28. - run: |
  29. npm install
  30. npm run build
  31. working-directory: ./web
  32. env:
  33. CI: true
  34. backend:
  35. name: Backend build
  36. runs-on: ubuntu-latest
  37. steps:
  38. - name: Set up Go 1.13
  39. uses: actions/setup-go@v1
  40. with:
  41. go-version: 1.13
  42. id: go
  43. - name: Check out branch
  44. uses: actions/checkout@v2
  45. - name: Download dependencies
  46. run: |
  47. go get -v -t -d ./...
  48. if [ -f Gopkg.toml ]; then
  49. curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
  50. dep ensure
  51. fi
  52. working-directory: ./server
  53. - name: Test and Build
  54. run: |
  55. go build -v -race
  56. working-directory: ./server