-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
64 lines (53 loc) · 1.44 KB
/
action.yml
File metadata and controls
64 lines (53 loc) · 1.44 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
name: flowcheck install dependencies & run code checkers
description: Install dependencies, run code checkers & run linter on creating and updating a Pull request.
branding:
icon: 'check-circle'
color: 'green'
inputs:
enableTests:
description: 'Enable or disable running tests'
default: true
enableLinter:
description: 'Enable or disable running the linter'
default: true
testCommand:
description: 'Command to run tests'
default: 'composer run test'
lintCommand:
description: 'Command to run linter'
default: 'npm run lint'
runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest
shell: bash
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install npm dependencies
run: npm ci
shell: bash
- name: Run tests
run: |
if [ ${{ inputs.enableTests }} == true ]; then
${{ inputs.testCommand }}
else
echo "Tests are disabled."
fi
shell: bash
- name: Run linter
run: |
if [ ${{ inputs.enableLinter }} == true ]; then
${{ inputs.lintCommand }}
else
echo "Linter is disabled."
fi
shell: bash