build_test.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. - name: Build test
  29. run: |
  30. npm install
  31. npm run build
  32. working-directory: ./web
  33. backend:
  34. name: Backend build
  35. runs-on: ubuntu-latest
  36. steps:
  37. - name: Set up Go 1.13
  38. uses: actions/setup-go@v1
  39. with:
  40. go-version: 1.13
  41. id: go
  42. - name: Check out branch
  43. uses: actions/checkout@v2
  44. - name: Download dependencies
  45. run: |
  46. go get -v -t -d ./...
  47. if [ -f Gopkg.toml ]; then
  48. curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
  49. dep ensure
  50. fi
  51. working-directory: ./server
  52. - name: Test and Build
  53. run: |
  54. go build -v -race
  55. working-directory: ./server