Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

123 rindas
3.6 KiB

  1. name: 'CI'
  2. on:
  3. pull_request:
  4. workflow_dispatch:
  5. push:
  6. branches: [ develop ]
  7. permissions:
  8. contents: read
  9. jobs:
  10. base_setup:
  11. runs-on: ubuntu-latest
  12. timeout-minutes: 60
  13. strategy:
  14. matrix:
  15. python-version: [ '3.7', '3.8', '3.9', '3.10' ]
  16. name: Base (${{ matrix.python-version }})
  17. services:
  18. mariadb:
  19. image: mariadb:10.6
  20. env:
  21. MARIADB_ROOT_PASSWORD: travis
  22. ports:
  23. - 3306:3306
  24. options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
  25. steps:
  26. - uses: actions/checkout@v3
  27. - uses: actions/setup-python@v4
  28. with:
  29. python-version: ${{ matrix.python-version }}
  30. - uses: actions/setup-node@v3
  31. with:
  32. node-version: 14
  33. - run: |
  34. wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb;
  35. sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb;
  36. sudo apt install redis-server
  37. python -m pip install -U --no-cache-dir --force-reinstall urllib3 pyOpenSSL ndg-httpsclient pyasn1 wheel setuptools pip;
  38. python -m pip install -U -e ${GITHUB_WORKSPACE};
  39. - run: python ${GITHUB_WORKSPACE}/bench/tests/test_init.py TestBenchInit.basic
  40. production_setup:
  41. runs-on: ubuntu-latest
  42. timeout-minutes: 60
  43. strategy:
  44. matrix:
  45. python-version: [ '3.7', '3.10' ]
  46. name: Production (${{ matrix.python-version }})
  47. services:
  48. mariadb:
  49. image: mariadb:10.6
  50. env:
  51. MARIADB_ROOT_PASSWORD: travis
  52. ports:
  53. - 3306:3306
  54. options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
  55. steps:
  56. - uses: actions/checkout@v3
  57. - uses: actions/setup-python@v4
  58. with:
  59. python-version: ${{ matrix.python-version }}
  60. - uses: actions/setup-node@v3
  61. with:
  62. node-version: 14
  63. - run: |
  64. wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb;
  65. sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb;
  66. sudo apt install redis-server
  67. python -m pip install -U --no-cache-dir --force-reinstall urllib3 pyOpenSSL ndg-httpsclient pyasn1 wheel setuptools pip;
  68. python -m pip install -U -e ${GITHUB_WORKSPACE};
  69. - run: python bench/tests/test_setup_production.py TestSetupProduction.production
  70. tests:
  71. runs-on: ubuntu-latest
  72. timeout-minutes: 60
  73. strategy:
  74. matrix:
  75. python-version: [ '3.7', '3.10' ]
  76. name: Tests (${{ matrix.python-version }})
  77. services:
  78. mariadb:
  79. image: mariadb:10.6
  80. env:
  81. MARIADB_ROOT_PASSWORD: travis
  82. ports:
  83. - 3306:3306
  84. options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
  85. steps:
  86. - uses: actions/checkout@v3
  87. - uses: actions/setup-python@v4
  88. with:
  89. python-version: ${{ matrix.python-version }}
  90. - uses: actions/setup-node@v3
  91. with:
  92. node-version: 14
  93. - run: |
  94. wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb;
  95. sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb;
  96. sudo apt install redis-server
  97. python -m pip install -U --no-cache-dir --force-reinstall urllib3 pyOpenSSL ndg-httpsclient pyasn1 wheel setuptools pip;
  98. python -m pip install -U -e ${GITHUB_WORKSPACE};
  99. - run: python -m unittest -v bench.tests.test_utils && python -m unittest -v bench.tests.test_init