Skip to content

Commit

Permalink
Test against PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Jan 20, 2024
1 parent ff9ebf1 commit 29750a7
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 30 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
jobs:
phpunit:
name: phpunit
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.1"
- "8.2"
- "8.3"
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -40,7 +40,7 @@ jobs:
run: make test-coveralls

- name: Upload code coverage
if: ${{ matrix.php-version == '7.2' }}
if: ${{ matrix.php-version == '8.3' }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM php:8.1-cli-buster
ARG PHP_VERSION=8.1
FROM php:${PHP_VERSION}-cli-bookworm

RUN apt-get update && \
apt-get install -y autoconf pkg-config && \
Expand Down
43 changes: 21 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ usage:
vendor:
@composer install

.PHONY: update
update:
@composer update

.PHONY: test-dependencies
test-dependencies: vendor

.PHONY: test
Expand All @@ -25,29 +22,31 @@ test: test-dependencies
.PHONY: test-coverage
test-coverage: test-dependencies
@mkdir -p build/coverage
@$(PHPUNIT) --coverage-html build/coverage --coverage-text
@XDEBUG_MODE=coverage $(PHPUNIT) --coverage-html build/coverage

.PHONY: test-coveralls
test-coveralls: test-dependencies
@mkdir -p build/logs
@$(PHPUNIT) --coverage-clover build/logs/clover.xml
@XDEBUG_MODE=coverage $(PHPUNIT) --coverage-clover build/logs/clover.xml

.PHONY: test-container
test-container:
@-docker-compose run --rm app bash
test-container: test-container-83

.PHONY: test-container-81
test-container-81:
@-docker-compose run --rm app81 bash
@docker-compose down -v

.PHONY: test-container-82
test-container-82:
@-docker-compose run --rm app82 bash
@docker-compose down -v

.PHONY: test-container-83
test-container-83:
@-docker-compose run --rm app83 bash
@docker-compose down -v

.PHONY: doc
doc: vendor
@mkdir -p build/docs
@apigen generate \
--source lib \
--destination build/docs/ \
--title "$(PACKAGE_NAME)" \
--template-theme "bootstrap"

.PHONY: clean
clean:
@rm -fR build
@rm -fR vendor
@rm -f composer.lock
.PHONY: lint
lint:
@XDEBUG_MODE=off vendor/bin/phpstan
32 changes: 30 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
---
version: "3.2"
services:
app:
build: .
app81:
build:
context: .
dockerfile: Dockerfile
args:
PHP_VERSION: '8.1'
environment:
PHP_IDE_CONFIG: 'serverName=icanboogie-session'
volumes:
- .:/app:delegated
- ~/.composer:/root/.composer:delegated
working_dir: /app
app82:
build:
context: .
dockerfile: Dockerfile
args:
PHP_VERSION: '8.2'
environment:
PHP_IDE_CONFIG: 'serverName=icanboogie-session'
volumes:
- .:/app:delegated
- ~/.composer:/root/.composer:delegated
working_dir: /app
app83:
build:
context: .
dockerfile: Dockerfile
args:
PHP_VERSION: '8.3'
environment:
PHP_IDE_CONFIG: 'serverName=icanboogie-session'
volumes:
Expand Down

0 comments on commit 29750a7

Please sign in to comment.