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.4 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. name: Django CI
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. strategy:
  11. max-parallel: 4
  12. matrix:
  13. db: [sqlite, postgres, mysql]
  14. python-version: [3.6, 3.7, 3.8]
  15. services:
  16. postgres:
  17. image: postgres:10
  18. env:
  19. POSTGRES_USER: hc
  20. POSTGRES_PASSWORD: hunter2
  21. options: >-
  22. --health-cmd pg_isready
  23. --health-interval 10s
  24. --health-timeout 5s
  25. --health-retries 5
  26. ports:
  27. - 2020:5432
  28. mysql:
  29. image: mysql:5.7
  30. env:
  31. MYSQL_USER: hc
  32. MYSQL_PASSWORD: hunter2
  33. ports:
  34. - 2020:3306
  35. options: >-
  36. --health-cmd="mysqladmin ping"
  37. --health-interval=10s
  38. --health-timeout=5s
  39. --health-retries=3
  40. steps:
  41. - uses: actions/checkout@v2
  42. - name: Set up Python ${{ matrix.python-version }}
  43. uses: actions/setup-python@v2
  44. with:
  45. python-version: ${{ matrix.python-version }}
  46. - name: Install Dependencies
  47. run: |
  48. python -m pip install --upgrade pip
  49. pip install -r requirements.txt
  50. pip install braintree mysqlclient apprise
  51. - name: Run Tests
  52. env:
  53. DB: ${{ matrix.db }}
  54. DB_HOST: 127.0.0.1
  55. DB_PORT: 2020
  56. DB_USER: hc
  57. DB_PASSWORD: hunter2
  58. run: |
  59. python manage.py test