Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .docker/runtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM php:8.3-alpine as build
FROM php:8.3-alpine AS build

RUN apk add --no-cache $PHPIZE_DEPS && \
apk add --no-cache linux-headers

RUN docker-php-ext-install sockets

FROM php:8.3-alpine as final
FROM php:8.3-alpine AS final

COPY --from=build /usr/local/lib/php /usr/local/lib/php
COPY --from=build /usr/local/etc/php /usr/local/etc/php
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,41 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1, 8.2, 8.3]
php: ['8.2', '8.3', '8.4', '8.5']

name: PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2,pecl
extensions: pdo_sqlite
ini-values: opcache.enable=0
tools: composer:v2
extensions: pdo_sqlite, sockets
coverage: none

- name: Install Dependencies
run: composer update
run: composer update --prefer-dist --no-progress

- name: Build runtime image
run: docker build -t phpunit-runtime .docker/runtime

- name: Run phpunit tests (docker)
run: PROCESS_FACTORY=docker vendor/bin/phpunit --stop-on-error

- name: Run phpunit tests (host)
run: PROCESS_FACTORY=host vendor/bin/phpunit --stop-on-error

- name: Run phpunit tests
run: |
mkdir -p build/logs
PROCESS_FACTORY=host vendor/bin/phpunit
PROCESS_FACTORY=docker vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
- name: Run phpcs
run: composer cs

Expand All @@ -56,7 +60,3 @@ jobs:
chmod +x workshop-manager.phar
./workshop-manager.phar install php8appreciate master
./workshop-manager.phar installed

- name: Coverage upload
if: matrix.php == '8.0'
run: bash <(curl -s https://codecov.io/bash)
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/exercises/*/solution/vendor
/test/solutions/*/*/vendor
.phpunit.result.cache
.phpunit.cache
18 changes: 11 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
}
],
"require": {
"php": "^8.0",
"php-school/php-workshop": "dev-docker-fixes"
"php": ">=8.2",
"php-school/php-workshop": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "^9",
"squizlabs/php_codesniffer": "^3.5",
"phpstan/phpstan": "^1.8.10",
"timeweb/phpstan-enum": "^3.1"
"phpunit/phpunit": "^11.5",
"squizlabs/php_codesniffer": "^3.13",
"phpstan/phpstan": "^2.1"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -59,5 +58,10 @@
},
"bin": [
"bin/php8appreciate"
]
],
"config": {
"platform": {
"php": "8.2.0"
}
}
}
Loading
Loading