build-lint.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: Musare Build and Lint
  2. on: [ push, pull_request, workflow_dispatch ]
  3. env:
  4. COMPOSE_PROJECT_NAME: musare
  5. RESTART_POLICY: unless-stopped
  6. CONTAINER_MODE: prod
  7. BACKEND_HOST: 127.0.0.1
  8. BACKEND_PORT: 8080
  9. FRONTEND_HOST: 127.0.0.1
  10. FRONTEND_PORT: 80
  11. FRONTEND_MODE: prod
  12. MONGO_HOST: 127.0.0.1
  13. MONGO_PORT: 27017
  14. MONGO_ROOT_PASSWORD: PASSWORD_HERE
  15. MONGO_USER_USERNAME: musare
  16. MONGO_USER_PASSWORD: OTHER_PASSWORD_HERE
  17. MONGO_DATA_LOCATION: .db
  18. MONGO_VERSION: 5.0
  19. REDIS_HOST: 127.0.0.1
  20. REDIS_PORT: 6379
  21. REDIS_PASSWORD: PASSWORD
  22. REDIS_DATA_LOCATION: .redis
  23. jobs:
  24. build-lint:
  25. runs-on: ubuntu-latest
  26. steps:
  27. - uses: actions/checkout@v3
  28. - name: Build Musare
  29. run: |
  30. cp .env.example .env
  31. cp backend/config/template.json backend/config/default.json
  32. cp frontend/dist/config/template.json frontend/dist/config/default.json
  33. ./musare.sh build
  34. - name: Start Musare
  35. run: ./musare.sh start
  36. - name: Backend Lint
  37. run: ./musare.sh lint backend
  38. - name: Backend Typescript
  39. run: ./musare.sh typescript backend
  40. - name: Frontend Lint
  41. run: ./musare.sh lint frontend
  42. - name: Frontend Typescript
  43. run: ./musare.sh typescript frontend
  44. - name: Docs Lint
  45. run: ./musare.sh lint docs