Skip to content

CI

CI #43

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
# Run every on Friday to ensure everything works as expected.
- cron: '0 6 * * 5'
jobs:
CI:
runs-on: ubuntu-20.04
container:
image: zammad/zammad-ci:latest
services:
postgresql:
image: postgres:10
env:
POSTGRES_USER: zammad
POSTGRES_PASSWORD: zammad
redis:
# Use Redis 5 which is shipped in Debian 10.
image: redis:5
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@v2
- 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