build-eslint.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Musare Build and ESLint
  2. on: [ push, pull_request, workflow_dispatch ]
  3. env:
  4. COMPOSE_PROJECT_NAME: musare
  5. BACKEND_HOST: 127.0.0.1
  6. BACKEND_PORT: 8080
  7. FRONTEND_HOST: 127.0.0.1
  8. FRONTEND_PORT: 80
  9. FRONTEND_MODE: dev
  10. MONGO_HOST: 127.0.0.1
  11. MONGO_PORT: 27017
  12. MONGO_ROOT_PASSWORD: PASSWORD_HERE
  13. MONGO_USER_USERNAME: musare
  14. MONGO_USER_PASSWORD: OTHER_PASSWORD_HERE
  15. MONGO_DATA_LOCATION: .db
  16. MONGO_VERSION: 5.0
  17. REDIS_HOST: 127.0.0.1
  18. REDIS_PORT: 6379
  19. REDIS_PASSWORD: PASSWORD
  20. REDIS_DATA_LOCATION: .redis
  21. jobs:
  22. build-eslint:
  23. runs-on: ubuntu-latest
  24. steps:
  25. - uses: actions/checkout@v2
  26. - name: Build Musare
  27. run: |
  28. cp backend/config/template.json backend/config/default.json
  29. cp frontend/dist/config/template.json frontend/dist/config/default.json
  30. docker-compose build
  31. docker-compose pull
  32. - name: Start Musare
  33. run: docker-compose up -d
  34. - name: ESlint Backend
  35. run: docker-compose exec -T backend /bin/bash -c "npx eslint app/logic"
  36. - name: ESLint Frontend
  37. run: docker-compose exec -T frontend /bin/bash -c "cd app && npm run lint"