build-eslint.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. REDIS_HOST: 127.0.0.1
  16. REDIS_PORT: 6379
  17. REDIS_PASSWORD: PASSWORD
  18. jobs:
  19. build-eslint:
  20. runs-on: ubuntu-latest
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Build Musare
  24. run: |
  25. cp backend/config/template.json backend/config/default.json
  26. cp frontend/dist/config/template.json frontend/dist/config/default.json
  27. docker-compose build
  28. docker-compose pull
  29. - name: Start Musare
  30. run: docker-compose up -d
  31. - name: ESlint Backend
  32. run: docker-compose exec -T backend /bin/bash -c "npx eslint app/logic"
  33. - name: ESLint Frontend
  34. run: docker-compose exec -T frontend /bin/bash -c "cd app && npm run lint"