ci.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: ci
  2. on:
  3. pull_request
  4. jobs:
  5. lint-bash-scripts:
  6. runs-on: ubuntu-latest
  7. steps:
  8. - name: Checkout
  9. uses: actions/checkout@v1
  10. - name: Lint Bash scripts
  11. uses: docker://koalaman/shellcheck-alpine:v0.7.0
  12. with:
  13. args: .github/lint-scripts.sh
  14. ci:
  15. runs-on: ubuntu-latest
  16. needs: lint-bash-scripts
  17. services:
  18. mysql:
  19. image: mysql:5
  20. env:
  21. MYSQL_ROOT_PASSWORD: password
  22. ports:
  23. - 13306:3306
  24. options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
  25. postgres:
  26. image: postgres:11
  27. env:
  28. POSTGRES_USER: postgres
  29. POSTGRES_PASSWORD: postgres
  30. ports:
  31. - 5432:5432
  32. options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
  33. strategy:
  34. matrix:
  35. dbs:
  36. - mysql
  37. - postgresql
  38. env:
  39. RAILS_ENV: test
  40. ZAMMAD_DBS: ${{ matrix.dbs }}
  41. steps:
  42. - name: Checkout
  43. uses: actions/checkout@v1
  44. - name: Set up Ruby
  45. uses: ruby/setup-ruby@v1
  46. with:
  47. ruby-version: 2.6.6
  48. - name: Increase MySQL max_allowed_packet to 1GB (workaround for unknown/missing service option)
  49. run: |
  50. sudo apt-get install -y mysql-client
  51. mysql --host 127.0.0.1 --port 13306 -uroot -ppassword -e "SET GLOBAL max_allowed_packet=1073741824;"
  52. - name: CI
  53. run: .github/ci.sh