1
- # This is a basic workflow to help you get started with Actions
2
-
3
1
name : CI
4
2
5
- # Controls when the action will run.
6
3
on :
7
- # Triggers the workflow on push or pull request events but only for the 2.x branch
8
4
push :
9
5
branches : [ 2.x ]
10
6
pull_request :
11
7
branches : [ 2.x ]
12
-
13
- # Allows you to run this workflow manually from the Actions tab
14
8
workflow_dispatch :
15
9
16
- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
17
10
jobs :
18
- # This workflow contains a single job called "build"
19
11
build :
20
- # The type of runner that the job will run on
12
+ env :
13
+ DRUPAL_VERSION : ${{ matrix.drupal-version }}
14
+ SCRIPT_DIR : ${{ github.workspace }}/islandora_ci
15
+ DRUPAL_DIR : /opt/drupal
16
+ PHPUNIT_FILE : ${{ github.workspace }}/build_dir/phpunit.xml
17
+ MINK_DRIVER_ARGS_WEBDRIVER : ' ["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://localhost:9515"]'
18
+ CHROMEDRIVER_VERSION : 114.0.5735.90
19
+
21
20
runs-on : ubuntu-latest
22
21
continue-on-error : ${{ matrix.allowed_failure }}
23
22
strategy :
24
23
fail-fast : false
25
24
matrix :
26
- php-versions : ["8.1", "8.2"]
27
- # test-suite functional-javascript will appear to pass but will skip tests; missing chromedriver.
25
+ php-versions : ["8.1", "8.2", "8.3"]
28
26
test-suite : ["kernel", "functional", "functional-javascript"]
29
- drupal-version : ["10.0 .x", "10.1 .x", "10.2 .x-dev"]
27
+ drupal-version : ["10.1 .x", "10.2 .x", "10.3 .x-dev"]
30
28
mysql : ["8.0"]
31
29
allowed_failure : [false]
30
+ exclude :
31
+ - php-versions : " 8.3"
32
+ drupal-version : " 10.1.x"
32
33
33
34
34
35
name : PHP ${{ matrix.php-versions }} | drupal ${{ matrix.drupal-version }} | mysql ${{ matrix.mysql }} | test-suite ${{ matrix.test-suite }}
@@ -47,24 +48,16 @@ jobs:
47
48
- 8161:8161
48
49
- 61616:61616
49
50
- 61613:61613
50
- chrome :
51
- image : drupalci/webdriver-chromedriver:production
52
- ports :
53
- - 9515:9515
54
- # XXX: Doesn't presently work; however, seems to represent the current default.
55
- # options: --entrypoint 'chromedriver --log-path=/tmp/chromedriver.log --verbose --allowed-ips= --allowed-origins=*'
56
51
57
- # Steps represent a sequence of tasks that will be executed as part of the job
58
52
steps :
59
53
60
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
61
54
- name : Checkout code
62
- uses : actions/checkout@v3
55
+ uses : actions/checkout@v4
63
56
with :
64
57
path : build_dir
65
58
66
59
- name : Checkout islandora_ci
67
- uses : actions/checkout@v3
60
+ uses : actions/checkout@v4
68
61
with :
69
62
repository : islandora/islandora_ci
70
63
ref : github-actions
82
75
sudo apt-get remove -y mysql-client mysql-common
83
76
sudo apt-get install -y mysql-client
84
77
85
- - name : Set environment variables
86
- run : |
87
- echo "DRUPAL_VERSION=${{ matrix.drupal-version }}" >> $GITHUB_ENV
88
- echo "SCRIPT_DIR=$GITHUB_WORKSPACE/islandora_ci" >> $GITHUB_ENV
89
- echo "DRUPAL_DIR=/opt/drupal" >> $GITHUB_ENV
90
- echo "PHPUNIT_FILE=$GITHUB_WORKSPACE/build_dir/phpunit.xml" >> $GITHUB_ENV
91
-
92
78
- name : Cache Composer dependencies
93
79
uses : actions/cache@v3
94
80
with :
@@ -121,11 +107,23 @@ jobs:
121
107
122
108
- name : Test scripts
123
109
run : $SCRIPT_DIR/travis_scripts.sh
110
+
111
+ - name : Start chromedriver
112
+ if : matrix.test-suite == 'functional-javascript'
113
+ run : |-
114
+ curl -s -o ./chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip
115
+ unzip chromedriver_linux64.zip
116
+ ./chromedriver \
117
+ --log-path=/tmp/chromedriver.log \
118
+ --verbose \
119
+ --allowed-ips= \
120
+ --allowed-origins=*" &
124
121
125
122
- name : PHPUNIT tests
126
- env :
127
- MINK_DRIVER_ARGS : ' ["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://chrome:9515"]'
128
- MINK_DRIVER_ARGS_WEBDRIVER : ' ["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://chrome:9515"]'
129
123
run : |
130
124
cd $DRUPAL_DIR/web/core
131
125
$DRUPAL_DIR/vendor/bin/phpunit --verbose --testsuite "${{ matrix.test-suite }}"
126
+
127
+ - name : Print chromedriver logs
128
+ if : matrix.test-suite == 'functional-javascript'
129
+ run : cat /tmp/chromedriver.log
0 commit comments