-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
62 lines (56 loc) · 1.69 KB
/
action.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
name: 'PmmpUnit Tests'
description: 'Run PmmpUnit Tests'
inputs:
suite-test:
description: "Suite test to run"
required: true
tests-path:
description: 'Path to tests'
required: true
default: 'tests/pmmpunit'
php-version:
description: 'PHP version'
required: true
default: '8.1'
env-file:
description: 'Path to env file'
required: false
default: '.env'
timeout:
description: 'Timeout for tests (in seconds)'
required: false
default: '60'
mysql:
description: 'If mysql needs to be started'
required: true
default: 'false'
mysql-version:
description: 'Mysql version'
required: false
default: '8.0'
mysql-entrypoint:
description: 'Mysql entrypoint script (folder/file)'
required: false
default: ''
outputs:
failed-tests:
description: 'Number of failed tests'
runs:
using: 'composite'
steps:
- name: 'Prepare environment'
shell: bash
id: "prepare"
run: "${{github.action_path}}prepare.sh ${{ inputs.php-version }} ${{ inputs.tests-path }} ${{ inputs.suite-test }} ${{ inputs.env-file }} ${{ inputs.mysql }} ${{ inputs.mysql-version }} ${{ inputs.mysql-entrypoint }}"
- name: 'Run tests'
shell: bash
id: "run"
run: "${{github.action_path}}run.sh ${{ steps.prepare.outputs.pocketmine_name }} ${{ inputs.timeout }} ${{ steps.prepare.outputs.mysql_name }}"
- name: 'Collect results'
shell: bash
id: "finish"
run: "${{github.action_path}}exitpoint.sh ${{ steps.prepare.outputs.pocketmine_name }}"
- name: "Cleanup"
if: always()
shell: bash
run: "${{github.action_path}}cleanup.sh ${{ steps.prepare.outputs.container_prefix }}"