-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (116 loc) · 4.25 KB
/
Copy pathcodeception-master.yml
File metadata and controls
120 lines (116 loc) · 4.25 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: module-tests-master
on:
workflow_call:
inputs:
humhub-branch:
description: Test against HumHub Branch.
required: false
default: master
type: string
php:
description: PHP versions to test, separated by comma.
default: >-
['8.2', '8.3', '8.4']
type: string
os:
description: Os to test, separated by comma.
default: >-
['ubuntu-latest']
type: string
module-id:
description: Module ID.
required: true
type: string
extensions:
description: List of extensions to PHP.
default: curl, intl, pdo, pdo_mysql, zip, exif, fileinfo, mbstring, gd, ldap
type: string
databases:
# JSON list of {engine, version}. engine: mariadb | mysql.
# Validated: mariadb 11.8 (LTS, recommended) & 12.3 (LTS); mysql 8.4 (LTS) & 9.7 (LTS).
# Default runs MariaDB 11.8 only. Modules can override per-module to test more/other combinations (rare case).
description: Databases to test, JSON list of {engine, version} objects.
default: >-
[{"engine": "mariadb", "version": "11.8"}]
type: string
use-rest-module:
description: Activate REST API module for api tests.
default: false
type: boolean
rest-module-branch:
description: REST API Module Branch.
type: string
default: master
run-solr:
description: Run Apache Solr.
default: false
type: boolean
run-clamav:
description: Run virus scanner ClamAV.
default: false
type: boolean
additional-module-id:
description: Additional Module ID.
type: string
additional-module-repo:
description: Additional Module Repository.
type: string
default: humhub
additional-module-branch:
description: Additional Module Branch.
type: string
default: master
jobs:
call-base:
uses: ./.github/workflows/codeception-base.yml
with:
module-id: ${{ inputs.module-id }}
humhub-branch: ${{ inputs.humhub-branch }}
php: ${{ inputs.php }}
extensions: ${{ inputs.extensions }}
databases: ${{ inputs.databases }}
use-rest-module: ${{ inputs.use-rest-module }}
rest-module-branch: ${{ inputs.rest-module-branch }}
run-solr: ${{ inputs.run-solr }}
run-clamav: ${{ inputs.run-clamav }}
additional-module-id: ${{ inputs.additional-module-id }}
additional-module-repo: ${{ inputs.additional-module-repo }}
additional-module-branch: ${{ inputs.additional-module-branch }}
# On scheduled and manually dispatched runs, additionally test the module's
# develop branch (if one exists) against the same core branch. Combinations
# outside the develop branch's min/max core version are skipped by the
# compatibility check in the base workflow.
check-develop-branch:
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref_name != 'develop'
runs-on: ubuntu-latest
outputs:
exists: ${{ steps.check.outputs.exists }}
steps:
- name: Check if the module has a develop branch
id: check
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh api "repos/$GITHUB_REPOSITORY/branches/develop" --silent; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
call-base-develop:
needs: check-develop-branch
if: needs.check-develop-branch.outputs.exists == 'true'
uses: ./.github/workflows/codeception-base.yml
with:
module-id: ${{ inputs.module-id }}
module-branch: develop
humhub-branch: ${{ inputs.humhub-branch }}
php: ${{ inputs.php }}
extensions: ${{ inputs.extensions }}
databases: ${{ inputs.databases }}
use-rest-module: ${{ inputs.use-rest-module }}
rest-module-branch: ${{ inputs.rest-module-branch }}
run-solr: ${{ inputs.run-solr }}
run-clamav: ${{ inputs.run-clamav }}
additional-module-id: ${{ inputs.additional-module-id }}
additional-module-repo: ${{ inputs.additional-module-repo }}
additional-module-branch: ${{ inputs.additional-module-branch }}