ci.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: CI
  2. on:
  3. pull_request
  4. jobs:
  5. CI:
  6. runs-on: ubuntu-latest
  7. container:
  8. image: zammad/zammad-ci:latest
  9. services:
  10. postgresql:
  11. image: postgres:10
  12. env:
  13. POSTGRES_USER: zammad
  14. POSTGRES_PASSWORD: zammad
  15. env:
  16. RAILS_ENV: test
  17. Z_LOCALES: "en-us:de-de"
  18. # Temporary switch to enable the mobile front end for testing.
  19. ENABLE_EXPERIMENTAL_MOBILE_FRONTEND: 'true'
  20. # Compile assets only once.
  21. CI_SKIP_ASSETS_PRECOMPILE: 'true'
  22. # Avoid unnecessary DB resets.
  23. CI_SKIP_DB_RESET: 'true'
  24. steps:
  25. - name: Checkout
  26. uses: actions/checkout@v3
  27. - name: Cache node modules
  28. id: cache-npm
  29. uses: actions/cache@v3
  30. with:
  31. path: .yarn/cache
  32. key: ${{ runner.os }}-cache-npm-${{ hashFiles('yarn.lock') }}
  33. - name: Cache Rubygems
  34. id: cache-bundler
  35. uses: actions/cache@v3
  36. with:
  37. path: vendor/ruby
  38. key: ${{ runner.os }}-cache-bundler-${{ hashFiles('Gemfile.lock') }}
  39. - name: Pre
  40. run: .github/workflows/ci/pre.sh
  41. - name: Lint
  42. run: .github/workflows/ci/lint.sh
  43. - name: Test
  44. run: .github/workflows/ci/test.sh