ci.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. name: CI
  2. on:
  3. pull_request:
  4. schedule:
  5. # Run every on Friday to ensure everything works as expected.
  6. - cron: '0 6 * * 5'
  7. jobs:
  8. CI:
  9. runs-on: ubuntu-latest
  10. container:
  11. image: zammad/zammad-ci:latest
  12. services:
  13. postgresql:
  14. image: postgres:17
  15. env:
  16. POSTGRES_USER: zammad
  17. POSTGRES_PASSWORD: zammad
  18. redis:
  19. # Use Redis 5 which is shipped in Debian 10.
  20. image: redis:5
  21. env:
  22. RAILS_ENV: test
  23. Z_LOCALES: "en-us:de-de"
  24. TZ: 'Europe/London'
  25. REDIS_URL: redis://redis:6379
  26. # Compile assets only once.
  27. CI_SKIP_ASSETS_PRECOMPILE: 'true'
  28. # Avoid unnecessary DB resets.
  29. CI_SKIP_DB_RESET: 'true'
  30. steps:
  31. - name: Checkout
  32. uses: actions/checkout@v4
  33. - name: Install pnpm
  34. uses: pnpm/action-setup@v4
  35. - name: Use Node.js 20
  36. uses: actions/setup-node@v4
  37. with:
  38. node-version: 20
  39. cache: 'pnpm'
  40. - name: Cache Rubygems
  41. id: cache-bundler
  42. uses: actions/cache@v4
  43. with:
  44. path: vendor/bundle
  45. key: ${{ runner.os }}-cache-bundler-${{ hashFiles('Gemfile.lock') }}
  46. - name: Pre
  47. run: .github/workflows/ci/pre.sh
  48. - name: Lint
  49. run: .github/workflows/ci/lint.sh
  50. - name: Test
  51. run: .github/workflows/ci/test.sh