This repository has been archived by the owner on Nov 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
98 lines (78 loc) · 2.39 KB
/
testing.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Run module tests
on:
pull_request:
branches:
- 8.x-[1-9]+.x
paths-ignore:
- '**.md'
schedule:
- cron: '0 6 * * *'
env:
DRUPAL_TESTING_TEST_CODING_STYLES: false
DRUPAL_TESTING_DATABASE_USER: root
DRUPAL_TESTING_DATABASE_PASSWORD: root
DRUPAL_TESTING_DATABASE_ENGINE: mysql
DRUPAL_TESTING_HTTP_PORT: 8888
DRUPAL_TESTING_PARALLEL_TESTING: true
jobs:
build:
runs-on: ubuntu-20.04
services:
mysql:
image: mariadb:latest
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
strategy:
matrix:
DRUPAL_TESTING_DRUPAL_VERSION: ['~9.2.0']
PHP_VERSION: [ '8.0' ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.PHP_VERSION }}
extensions: Imagick, gd, pdo_mysql
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: ${{ runner.os }}-composer-cache-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-cache-
- name: Cache NPM dependencies
id: npm-cache
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-npm-cache
restore-keys: ${{ runner.os }}-npm-cache
- name: Get build environment
run: composer global require thunder/drupal-testing
- name: Prepare the build
run: test-drupal-project prepare_build
env:
DRUPAL_TESTING_DRUPAL_VERSION: ${{ matrix.DRUPAL_TESTING_DRUPAL_VERSION }}
- name: Add select2 library to the composer dependencies
run: composer require npm-asset/select2:^4.0.7 --no-update
working-directory: /tmp/test/select2/install
- name: Build the docroot
run: test-drupal-project build
- name: Test for deprecations
run: test-drupal-project deprecation
- name: Install drupal
run: test-drupal-project install
env:
DRUPAL_TESTING_TEST_DEPRECATION: false
- name: Setup Apache
uses: thunder/apache-shiva-php-action@v1
with:
php-version: ${{ matrix.PHP_VERSION }}
site-directory: /tmp/test/select2/install/web
http-port: ${{ env.DRUPAL_TESTING_HTTP_PORT }}
- name: Run the tests
run: test-drupal-project