Skip to content

Commit b2d0aa7

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # composer.lock
2 parents 2fe5719 + 93a92a8 commit b2d0aa7

11 files changed

Lines changed: 92 additions & 71 deletions
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM --platform=linux/amd64 php:8.3.0beta1-apache
2+
RUN apt-get update && apt-get install -y --no-install-recommends \
3+
git \
4+
iputils-ping \
5+
libldap2-dev \
6+
libpng-dev \
7+
libpq-dev \
8+
libsqlite3-dev \
9+
libzip-dev \
10+
mariadb-client \
11+
postgresql-client \
12+
sqlite3 \
13+
sudo \
14+
unzip \
15+
vim \
16+
&& apt-get -y clean \
17+
&& rm -rf /var/lib/apt/lists/*
18+
RUN docker-php-ext-install bcmath zip pdo pdo_mysql pdo_pgsql pdo_sqlite exif gd ldap
19+
COPY composer.json /composer.json
20+
COPY composer.lock /composer.lock
21+
COPY src /src
22+
COPY test /test
23+
RUN curl -sS https://getcomposer.org/installer | php; mv composer.phar /usr/local/bin/composer; chmod +x /usr/local/bin/composer
24+
RUN cd / && composer update
25+
#RUN composer test

.github/workflows/php.yml

Lines changed: 15 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -4,76 +4,29 @@ on:
44
push:
55
branches:
66
- "*"
7+
pull_request:
8+
branches: [ 'master', 'main' ]
9+
schedule:
10+
- cron: '0 9 15 * *'
711

812
jobs:
9-
test-with-php82:
13+
test:
14+
name: Test
1015
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
1119
steps:
12-
- uses: actions/checkout@v2
13-
- name: docker-compose-run
20+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
21+
- name: Run docker-compose
1422
shell: bash
1523
run: |
16-
cp .github/workflows/Dockerfile-for-php-8.2 Dockerfile
24+
cp .github/workflows/php-${{ matrix.php }}.dockerfile Dockerfile
1725
docker-compose up -d
18-
sleep 60
19-
docker-compose exec -T web sh -c "cd / && composer test"
20-
21-
test-with-php81:
22-
runs-on: ubuntu-latest
23-
steps:
24-
- uses: actions/checkout@v2
25-
- name: docker-compose-run
26-
shell: bash
27-
run: |
28-
cp .github/workflows/Dockerfile-for-php-8.1 Dockerfile
29-
docker-compose up -d
30-
sleep 60
31-
docker-compose exec -T web sh -c "cd / && composer test"
32-
33-
test-with-php80:
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/checkout@v2
37-
- name: docker-compose-run
38-
shell: bash
39-
run: |
40-
cp .github/workflows/Dockerfile-for-php-8.0 Dockerfile
41-
docker-compose up -d
42-
sleep 60
43-
docker-compose exec -T web sh -c "cd / && composer test"
44-
45-
test-with-php74:
46-
runs-on: ubuntu-latest
47-
steps:
48-
- uses: actions/checkout@v2
49-
- name: docker-compose-run
50-
shell: bash
51-
run: |
52-
cp .github/workflows/Dockerfile-for-php-7.4 Dockerfile
53-
docker-compose up -d
54-
sleep 60
55-
docker-compose exec -T web sh -c "cd / && composer test"
56-
57-
test-with-php73:
58-
runs-on: ubuntu-latest
59-
steps:
60-
- uses: actions/checkout@v2
61-
- name: docker-compose-run
62-
shell: bash
63-
run: |
64-
cp .github/workflows/Dockerfile-for-php-7.3 Dockerfile
65-
docker-compose up -d
66-
sleep 60
67-
docker-compose exec -T web sh -c "cd / && composer test"
26+
sleep 30
6827
69-
test-with-php72:
70-
runs-on: ubuntu-latest
71-
steps:
72-
- uses: actions/checkout@v2
73-
- name: docker-compose-run
28+
- name: Run testing
7429
shell: bash
7530
run: |
76-
cp .github/workflows/Dockerfile-for-php-7.2 Dockerfile
77-
docker-compose up -d
78-
sleep 60
31+
sleep 30
7932
docker-compose exec -T web sh -c "cd / && composer test"

.github/workflows/phpstan.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: run-phpstan
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
pull_request:
8+
branches: [ 'master', 'main' ]
9+
10+
jobs:
11+
run:
12+
name: Run PHPStan
13+
runs-on: 'ubuntu-latest'
14+
strategy:
15+
matrix:
16+
level: [ 0, 1, 2 ]
17+
include:
18+
- current-level: 0
19+
steps:
20+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@72ae4ccbe57f82bbe08411e84e2130bd4ba1c10f # v2.25.5
24+
with:
25+
php-version: '8.1'
26+
27+
- name: Install PHPStan
28+
run: composer require --dev phpstan/phpstan
29+
30+
- name: Run PHPStan
31+
if: matrix.level == matrix.current-level
32+
continue-on-error: true
33+
run: |
34+
./vendor/bin/phpstan analyse -l "${{ matrix.level }}" --memory-limit 128M src test
35+
exit 0
36+
37+
- name: Run PHPStan
38+
if: matrix.level > matrix.current-level
39+
continue-on-error: true
40+
run: |
41+
./vendor/bin/phpstan analyse -l "${{ matrix.level }}" --memory-limit 128M src test
42+
exit 0

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
},
1717
"require-dev": {
1818
"phpunit/phpunit": "*",
19-
"phpdocumentor/phpdocumentor": ">=3"
19+
"phpdocumentor/phpdocumentor": ">=3",
20+
"phpstan/phpstan": "^1.10"
2021
},
2122
"autoload": {
2223
"psr-4": {

0 commit comments

Comments
 (0)