ci.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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:10
  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. REDIS_URL: redis://redis:6379
  25. # Compile assets only once.
  26. CI_SKIP_ASSETS_PRECOMPILE: 'true'
  27. # Avoid unnecessary DB resets.
  28. CI_SKIP_DB_RESET: 'true'
  29. steps:
  30. - name: Checkout
  31. uses: actions/checkout@v3
  32. - name: Cache node modules
  33. id: cache-npm
  34. uses: actions/cache@v3
  35. with:
  36. path: .yarn/cache
  37. key: ${{ runner.os }}-cache-npm-${{ hashFiles('yarn.lock') }}
  38. - name: Cache Rubygems
  39. id: cache-bundler
  40. uses: actions/cache@v3
  41. with:
  42. path: vendor/ruby
  43. key: ${{ runner.os }}-cache-bundler-${{ hashFiles('Gemfile.lock') }}
  44. - name: Pre
  45. run: .github/workflows/ci/pre.sh
  46. - name: Lint
  47. run: .github/workflows/ci/lint.sh
  48. - name: Test
  49. run: .github/workflows/ci/test.sh