CI #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
schedule: | |
# Run every on Friday to ensure everything works as expected. | |
- cron: '0 6 * * 5' | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
container: | |
image: zammad/zammad-ci:latest | |
services: | |
postgresql: | |
image: postgres:17 | |
env: | |
POSTGRES_USER: zammad | |
POSTGRES_PASSWORD: zammad | |
redis: | |
image: redis:7 | |
env: | |
ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_URL: "http://localhost:3000" | |
ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_USERNAME: "[email protected]" | |
ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_PASSWORD: "test" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Zammad | |
shell: bash | |
run: | | |
git clone --depth 1 https://github.com/zammad/zammad.git | |
cd zammad | |
source /etc/profile.d/rvm.sh # ensure RVM is loaded | |
bundle config set --local frozen 'true' | |
bundle config set --local path 'vendor' | |
bundle install -j $(nproc) | |
bundle exec ruby .gitlab/configure_environment.rb | |
source .gitlab/environment.env | |
RAILS_ENV=test bundle exec rake db:create | |
cp contrib/auto_wizard_test.json auto_wizard.json | |
bundle exec rake zammad:ci:test:start | |
- name: Run Ruby API integration tests | |
shell: bash | |
run: | | |
source /etc/profile.d/rvm.sh # ensure RVM is loaded | |
bundle update --bundler | |
bundle install -j $(nproc) | |
bundle exec rspec |