forked from BitLucid/ninjawars
-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (57 loc) · 2.09 KB
/
php.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
63
64
65
66
67
name: PHP NW Run
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/[email protected]
with:
php-version: "8.2.4"
extensions: mbstring, intl, pgsql, xml
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Validate composer.json and composer.lock
run: ./composer.phar validate
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies and create autoload
if: steps.composer-cache.outputs.cache-hit != 'true'
run: |
chmod ug+x ./configure
./configure
make create-structure
make preconfig
make link-vendor
make build
# ./composer.phar install --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader
- name: Run unit test suite
run: |
ln -sf ./resources.build.php ./deploy/resources.php
./composer.phar run-script unit-test
- name: Run test-check suite
run: |
ln -sf ./resources.build.php ./deploy/resources.php
./composer.phar run-script test-checkbase
# make db-init-all
#./composer.phar run-script test-cron