Skip to content

Commit

Permalink
Fix test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasmullie committed May 17, 2024
1 parent 67030b5 commit 6a41283
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Test PHP 8.3
run: make test PHP=8.3
run: make coverage PHP=8.3
- name: Test PHP 8.2
run: make test PHP=8.2
run: make coverage PHP=8.2
- uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
ARG version=cli
FROM php:$version

ARG xdebug
ARG pcov

WORKDIR /var/www
COPY . .

RUN apt-get update
RUN apt-get install -y zip unzip

RUN test -z "$xdebug" || (pecl install -f xdebug && docker-php-ext-enable xdebug)
RUN test -z "$pcov" || (pecl install -f pcov && docker-php-ext-enable pcov)
RUN pecl install -f xdebug && docker-php-ext-enable xdebug
RUN pecl install -f pcov && docker-php-ext-enable pcov

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer install
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ docs:
test:
VERSION=$$(echo "$(PHP)-cli" | sed "s/^-//");\
test $$(docker images -q matthiasmullie/types:$$VERSION) || docker build -t matthiasmullie/types:$$VERSION . --build-arg VERSION=$$VERSION;\
docker run -v $$(pwd)/src:/var/www/src -v $$(pwd)/tests:/var/www/tests -v $$(pwd)/phpunit.xml:/var/www/phpunit.xml matthiasmullie/types:$$VERSION vendor/bin/phpunit
docker run -v $$(pwd)/src:/var/www/src -v $$(pwd)/tests:/var/www/tests -v $$(pwd)/phpunit.xml:/var/www/phpunit.xml matthiasmullie/types:$$VERSION env XDEBUG_MODE=off vendor/bin/phpunit

coverage:
VERSION=$$(echo "$(PHP)-cli" | sed "s/^-//");\
Expand Down

0 comments on commit 6a41283

Please sign in to comment.