databases.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. name: databases
  2. on: [push, pull_request]
  3. jobs:
  4. mysql_57:
  5. runs-on: ubuntu-20.04
  6. services:
  7. mysql:
  8. image: mysql:5.7
  9. env:
  10. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  11. MYSQL_DATABASE: forge
  12. ports:
  13. - 3306:3306
  14. options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
  15. strategy:
  16. fail-fast: true
  17. name: MySQL 5.7
  18. steps:
  19. - name: Checkout code
  20. uses: actions/checkout@v2
  21. - name: Setup PHP
  22. uses: shivammathur/setup-php@v2
  23. with:
  24. php-version: 8.1
  25. extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql
  26. tools: composer:v2
  27. coverage: none
  28. - name: Install dependencies
  29. uses: nick-invision/retry@v1
  30. with:
  31. timeout_minutes: 5
  32. max_attempts: 5
  33. command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
  34. - name: Execute tests
  35. run: vendor/bin/phpunit tests/Integration/Database --verbose
  36. env:
  37. DB_CONNECTION: mysql
  38. DB_USERNAME: root
  39. mysql_8:
  40. runs-on: ubuntu-20.04
  41. services:
  42. mysql:
  43. image: mysql:8
  44. env:
  45. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  46. MYSQL_DATABASE: forge
  47. ports:
  48. - 3306:3306
  49. options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
  50. strategy:
  51. fail-fast: true
  52. name: MySQL 8.0
  53. steps:
  54. - name: Checkout code
  55. uses: actions/checkout@v2
  56. - name: Setup PHP
  57. uses: shivammathur/setup-php@v2
  58. with:
  59. php-version: 8.1
  60. extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql
  61. tools: composer:v2
  62. coverage: none
  63. - name: Install dependencies
  64. uses: nick-invision/retry@v1
  65. with:
  66. timeout_minutes: 5
  67. max_attempts: 5
  68. command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
  69. - name: Execute tests
  70. run: vendor/bin/phpunit tests/Integration/Database --verbose
  71. env:
  72. DB_CONNECTION: mysql
  73. DB_USERNAME: root
  74. mariadb:
  75. runs-on: ubuntu-20.04
  76. services:
  77. mysql:
  78. image: mariadb:10
  79. env:
  80. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  81. MYSQL_DATABASE: forge
  82. ports:
  83. - 3306:3306
  84. options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
  85. strategy:
  86. fail-fast: true
  87. name: MariaDB 10
  88. steps:
  89. - name: Checkout code
  90. uses: actions/checkout@v2
  91. - name: Setup PHP
  92. uses: shivammathur/setup-php@v2
  93. with:
  94. php-version: 8.1
  95. extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql
  96. tools: composer:v2
  97. coverage: none
  98. - name: Install dependencies
  99. uses: nick-invision/retry@v1
  100. with:
  101. timeout_minutes: 5
  102. max_attempts: 5
  103. command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
  104. - name: Execute tests
  105. run: vendor/bin/phpunit tests/Integration/Database --verbose
  106. env:
  107. DB_CONNECTION: mysql
  108. DB_USERNAME: root
  109. pgsql:
  110. runs-on: ubuntu-20.04
  111. services:
  112. postgresql:
  113. image: postgres:14
  114. env:
  115. POSTGRES_DB: forge
  116. POSTGRES_USER: forge
  117. POSTGRES_PASSWORD: password
  118. ports:
  119. - 5432:5432
  120. options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
  121. strategy:
  122. fail-fast: true
  123. name: PostgreSQL 14
  124. steps:
  125. - name: Checkout code
  126. uses: actions/checkout@v2
  127. - name: Setup PHP
  128. uses: shivammathur/setup-php@v2
  129. with:
  130. php-version: 8.1
  131. extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_pgsql
  132. tools: composer:v2
  133. coverage: none
  134. - name: Install dependencies
  135. uses: nick-invision/retry@v1
  136. with:
  137. timeout_minutes: 5
  138. max_attempts: 5
  139. command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
  140. - name: Execute tests
  141. run: vendor/bin/phpunit tests/Integration/Database --verbose
  142. env:
  143. DB_CONNECTION: pgsql
  144. DB_PASSWORD: password
  145. mssql:
  146. runs-on: ubuntu-20.04
  147. services:
  148. sqlsrv:
  149. image: mcr.microsoft.com/mssql/server:2019-latest
  150. env:
  151. ACCEPT_EULA: Y
  152. SA_PASSWORD: Forge123
  153. ports:
  154. - 1433:1433
  155. strategy:
  156. fail-fast: true
  157. name: SQL Server 2019
  158. steps:
  159. - name: Checkout code
  160. uses: actions/checkout@v2
  161. - name: Setup PHP
  162. uses: shivammathur/setup-php@v2
  163. with:
  164. php-version: 8.1
  165. extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlsrv, pdo, pdo_sqlsrv
  166. tools: composer:v2
  167. coverage: none
  168. - name: Install dependencies
  169. uses: nick-invision/retry@v1
  170. with:
  171. timeout_minutes: 5
  172. max_attempts: 5
  173. command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
  174. - name: Execute tests
  175. run: vendor/bin/phpunit tests/Integration/Database --verbose --exclude-group SkipMSSQL
  176. env:
  177. DB_CONNECTION: sqlsrv
  178. DB_DATABASE: master
  179. DB_USERNAME: SA
  180. DB_PASSWORD: Forge123