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.

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