-
Notifications
You must be signed in to change notification settings - Fork 21
61 lines (61 loc) · 1.82 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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-latest
container:
image: zammad/zammad-ci:latest
services:
postgresql:
image: postgres:17
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"
strategy:
fail-fast: false
matrix:
php: ['7.4', '7.3', '7.2', '8.0', '8.1', '8.2', '8.3', '8.4']
name: PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
env:
fail-fast: true
with:
php-version: ${{ matrix.php }}
- name: Report PHP version
run: php -v
- name: Install dependencies
shell: bash
run: |
composer install
- 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
RAILS_ENV=test bundle exec rake zammad:ci:test:start zammad:setup:auto_wizard
- name: Run PHP API integration tests
shell: bash
run: |
vendor/bin/phpunit