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.

64 lines
1.3 KiB

3 years ago
5 years ago
  1. name: yibu build test
  2. on:
  3. push:
  4. branches:
  5. - "*"
  6. paths-ignore:
  7. - "./db/**"
  8. - "**.md"
  9. pull_request:
  10. branches:
  11. - "*"
  12. paths-ignore:
  13. - "./db/**"
  14. - "**.md"
  15. jobs:
  16. frontend:
  17. name: Frontend build
  18. runs-on: ubuntu-latest
  19. strategy:
  20. matrix:
  21. node-version: [14.16.0]
  22. steps:
  23. - name: Check out branch
  24. uses: actions/checkout@v2
  25. - name: Use Node.js ${{ matrix.node-version }}
  26. uses: actions/setup-node@v1
  27. with:
  28. node-version: ${{ matrix.node-version }}
  29. - name: Build test
  30. run: |
  31. npm install
  32. npm run build
  33. working-directory: ./web
  34. backend:
  35. name: Backend build
  36. runs-on: ubuntu-latest
  37. steps:
  38. - name: Set up Go 1.6
  39. uses: actions/setup-go@v1
  40. with:
  41. go-version: 1.16
  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