generated from compucorp/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (45 loc) · 1.78 KB
/
unit-test.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
name: Tests
on: pull_request
jobs:
run-unit-tests:
runs-on: ubuntu-latest
container: compucorp/civicrm-buildkit:1.3.0-php8.0-chrome
env:
CIVICRM_EXTENSIONS_DIR: site/web/sites/all/modules/civicrm/tools/extensions
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Config mysql database as per CiviCRM requirement
run: echo "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" | mysql -u root --password=root --host=mysql
- name: Config amp
run : amp config:set --mysql_dsn=mysql://root:root@mysql:3306
- name: Build Drupal site
run: civibuild create drupal-clean --civi-ver 5.51.3 --cms-ver 7.79 --web-root $GITHUB_WORKSPACE/site
- uses: compucorp/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo: compucorp/civicrm-core
version: 5.51.3
path: site/web/sites/all/modules/civicrm
- uses: actions/checkout@v2
with:
path: ${{ env.CIVICRM_EXTENSIONS_DIR }}/uk.co.compucorp.manageletterheads
- name: Installing ManageLetterheads Extension
working-directory: ${{ env.CIVICRM_EXTENSIONS_DIR }}
run: cv en manageletterheads
- name: Run JS unit tests
working-directory: ${{ env.CIVICRM_EXTENSIONS_DIR }}/uk.co.compucorp.manageletterheads
run: |
npm install
npm test
- name: Run phpunit tests
if: ${{ always() }}
working-directory: ${{ env.CIVICRM_EXTENSIONS_DIR }}/uk.co.compucorp.manageletterheads
run: phpunit5