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.

68 lines
1.5 KiB

3 years ago
  1. name: doccano CI
  2. on: [push, pull_request]
  3. jobs:
  4. backend:
  5. runs-on: ubuntu-latest
  6. defaults:
  7. run:
  8. working-directory: ./backend
  9. steps:
  10. - uses: actions/checkout@v2
  11. - name: Set up Python 3.8
  12. uses: actions/setup-python@v2
  13. with:
  14. python-version: 3.8
  15. - name: Install dependencies
  16. run: |
  17. python -m pip install --upgrade pip
  18. pip install poetry
  19. poetry install
  20. - name: Run migrations
  21. run: |
  22. poetry run task wait_for_db
  23. poetry run task migrate
  24. - name: Lint with flake8
  25. run: |
  26. poetry run task flake8
  27. - name: Lint with isort
  28. run: |
  29. poetry run task isort
  30. - name: Black
  31. run: |
  32. poetry run task black
  33. - name: mypy
  34. run: |
  35. poetry run task mypy
  36. - name: Run tests
  37. run: |
  38. poetry run task test
  39. frontend:
  40. runs-on: ubuntu-latest
  41. defaults:
  42. run:
  43. working-directory: ./frontend
  44. steps:
  45. - uses: actions/checkout@v2
  46. - uses: actions/setup-node@v2
  47. with:
  48. node-version: '16'
  49. - name: Install Yarn
  50. run: npm install -g yarn
  51. - name: Install npm modules
  52. run: yarn install
  53. - name: Lint
  54. run: yarn lint
  55. docker-lint:
  56. runs-on: ubuntu-latest
  57. container: hadolint/hadolint:latest-debian
  58. defaults:
  59. run:
  60. working-directory: ./docker
  61. steps:
  62. - uses: actions/checkout@v2
  63. - name: hadolint
  64. run: hadolint ./Dockerfile*