forked from drupal-composer/drupal-project
-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (61 loc) · 2.33 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# GitHub workflow for Composer StratosERP installation.
#
name: Composer StratosERP installation.
on:
push:
branches:
- 9.x
- develop
env:
COMPOSER_MEMORY_LIMIT: -1
SIMPLETEST_DB: sqlite://tmp/site.sqlite
SIMPLETEST_BASE_URL: "http://127.0.0.1:8080"
SQLITE_DATABASE: $SIMPLETEST_DB
DTT_BASE_URL: "http://127.0.0.1:8080"
DTT_MINK_DRIVER_ARGS: '["chrome", null, "http://127.0.0.1:4444/wd/hub"]'
# Output directories
BROWSERTEST_OUTPUT_DIRECTORY: /tmp/browser_output
PRIVATE_DIR: /tmp/private
PUBLIC_DIR: /tmp/public
TMP_DIR: /tmp
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['8.0']
composer-channel: ['stable']
include:
- php-versions: '8.0'
composer-channel: stable
steps:
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: gd, pdo_sqlite, sqlite3
- name: Start ChromeDriver
run: |
google-chrome --version
xvfb-run --server-args="-screen 0, 1280x720x24" --auto-servernum \
chromedriver --port=4444 --url-base=/wd/hub &> /tmp/chromedriver.log &
- name: Update composer
run: composer --verbose self-update --${{ matrix.composer-channel }}
- name: Create an install using composer
run: composer create-project stratoserp/stratos-drupal-project:9.x-dev .
- name: Ensure directories for filesystem exist
run: mkdir -p $PRIVATE_DIR $PUBLIC_DIR $TMP_DIR $BROWSERTEST_OUTPUT_DIRECTORY
- name: Perform a standard installation
run: ./vendor/bin/drush -v site:install stratoserp_base --account-mail [email protected] --account-name admin --account-pass password --site-name 'Drupal site' --site-mail [email protected] --yes --db-url=$SIMPLETEST_DB
- name: Install modules for tests
run: ./vendor/bin/drush pm-enable se_example_data --yes
- run: ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
- run: until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
- name: Run unit tests to verify the testing setup.
run: ./vendor/bin/phpunit --testdox