-
Notifications
You must be signed in to change notification settings - Fork 10
50 lines (42 loc) · 1.86 KB
/
integration-tests-callable.yaml
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
on:
workflow_call: ~
env:
APP_ENV: dev
APP_DEBUG: 1
PHP_INI_ENV_memory_limit: 512M
COMPOSER_CACHE_DIR: ~/.composer/cache
PROJECT_VERSION: ^3.3.x-dev
PROJECT_EDITION: oss
SETUP: "doc/docker/base-dev.yml:doc/docker/selenium.yml"
WEB_HOST: web
jobs:
integration-tests-rest:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: ${{ env.PROJECT_EDITION }}-${{ env.PROJECT_VERSION }}-${{ github.sha }}
restore-keys: |
${{ env.PROJECT_EDITION }}-${{ env.PROJECT_VERSION }}
- name: Set up whole project using the tested dependency
run: |
curl -L "https://raw.githubusercontent.com/ibexa/ci-scripts/main/bin/${{ env.PROJECT_VERSION }}/prepare_project_edition.sh" > prepare_project_edition.sh
chmod +x prepare_project_edition.sh
./prepare_project_edition.sh ${{ env.PROJECT_EDITION }} ${{ env.PROJECT_VERSION }} ${{ env.SETUP }}
- name: Run setup command
run: |
cd "$HOME/build/project"
docker-compose --env-file=.env exec -T --user www-data app sh -c "APP_ENV=behat php bin/console ibexa:behat:create-language 'pol-PL' 'Polish (polski)'"
- name: Run tests
run: |
cd "$HOME/build/project"
docker-compose --env-file=.env exec -T --user www-data app sh -c "cd vendor/ezsystems/ezplatform-rest && composer update && composer integration"