File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run tests
2+
3+ on :
4+ push :
5+ branches :
6+ - ' **'
7+ - ' !main'
8+ - ' !develop'
9+ pull_request :
10+ branches :
11+ - main
12+ - develop
13+
14+ permissions :
15+ contents : read
16+
17+ jobs :
18+ test :
19+ runs-on : ubuntu-latest
20+
21+ steps :
22+ - uses : actions/checkout@v4
23+
24+ - name : Setup PHP
25+ uses : shivammathur/setup-php@v2
26+ with :
27+ php-version : ' 8.3'
28+
29+ - name : Check if composer.json exists
30+ id : check_files
31+ uses : andstor/file-existence-action@v1
32+ with :
33+ files : ' composer.json'
34+
35+ - name : Run composer install if composer.json exists
36+ if : steps.check_files.outputs.files_exists == 'true'
37+ run : composer validate --no-check-publish && composer install --prefer-dist --no-progress
38+
39+ - name : Set up Node.js version
40+ uses : actions/setup-node@v3
41+ with :
42+ node-version : ' 20.x'
43+
44+ - name : npm install
45+ run : npm install
46+
47+ - name : Run PHPUnit tests
48+ run : ./vendor/bin/phpunit --testdox
49+
You can’t perform that action at this time.
0 commit comments