-
-
Notifications
You must be signed in to change notification settings - Fork 43
docs: update documentation #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 7 commits
19ad9f9
e4db206
1cdcfc0
8831930
f4c1756
8093271
c9dfc66
b768dbe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,8 +18,7 @@ jobs: | |
| with: | ||
| args: --diff --dry-run | ||
|
|
||
| build: | ||
|
|
||
| tests: | ||
| strategy: | ||
| matrix: | ||
| container: [ "php81", "php82", "php83" ] | ||
|
|
@@ -55,11 +54,35 @@ jobs: | |
| - name: Install dependencies | ||
| run: docker compose run -u $(id -u):$(id -g) --rm ${{ matrix.container }} composer install --prefer-dist --no-progress | ||
|
|
||
| - name: Coding Standard Checks | ||
| run: docker compose run --rm ${{ matrix.container }} bin/php-cs-fixer fix --verbose --diff --dry-run | ||
| - name: Run tests | ||
| run: CONTAINER=${{ matrix.container }} make tests | ||
|
|
||
| tests-php84: | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extracted from the matrix while it is not stable |
||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Build Docker image | ||
| run: docker compose build php84 | ||
|
|
||
| - name: Unit tests | ||
| run: docker compose run --rm ${{ matrix.container }} ./bin/phpunit | ||
| - name: Validate composer.json | ||
| run: docker compose run -u $(id -u):$(id -g) --rm php84 composer validate | ||
|
|
||
| - name: Cache Composer packages | ||
| id: composer-cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: vendor | ||
| key: ${{ runner.os }}-php84-${{ hashFiles('**/composer.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-php84 | ||
|
|
||
| - name: Install dependencies | ||
| run: docker compose run -u $(id -u):$(id -g) --rm php84 composer install --prefer-dist --no-progress | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| docker compose run --rm php84 bin/php-cs-fixer fix --verbose --diff --dry-run | ||
| docker compose run --rm php84 bin/phpunit | ||
| docker compose run --rm php84 php -d error_reporting='E_ALL & ~E_DEPRECATED' bin/behat --snippets-for | ||
|
||
|
|
||
| - name: Run behat tests | ||
| run: docker compose run --rm ${{ matrix.container }} ./bin/behat --snippets-for | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| CONTAINER ?= php84 | ||
| DOCKER_RUN=docker compose run --rm $(CONTAINER) | ||
|
|
||
| .PHONY: setup tests matrix-tests doc-images | ||
|
|
||
| setup: | ||
| docker compose build $(CONTAINER) | ||
| $(DOCKER_RUN) composer update | ||
|
|
||
|
|
||
| tests: | ||
| docker compose run --rm $(CONTAINER) bin/php-cs-fixer fix --verbose --diff --dry-run | ||
| docker compose run --rm $(CONTAINER) bin/phpunit | ||
| docker compose run --rm $(CONTAINER) bin/behat --snippets-for | ||
|
|
||
| matrix-tests: | ||
| CONTAINER=php81 $(MAKE) setup | ||
| CONTAINER=php81 $(MAKE) tests | ||
|
|
||
| CONTAINER=php82 $(MAKE) setup | ||
| CONTAINER=php82 $(MAKE) tests | ||
|
|
||
| CONTAINER=php83 $(MAKE) setup | ||
| CONTAINER=php83 $(MAKE) tests | ||
|
|
||
| doc-images: | ||
| docker compose run --rm php83 rm -f doc/flat.svg doc/flat-square.svg doc/plastic.svg doc/for-the-badge.svg | ||
|
|
||
| docker compose run --rm php83 bin/poser poser FLAT blue -s "flat" -p "doc/flat.svg" | ||
| docker compose run --rm php83 bin/poser poser "FLAT SQUARE" blue -s "flat-square" -p "doc/flat-square.svg" | ||
| docker compose run --rm php83 bin/poser poser PLASTIC blue -s "plastic" -p "doc/plastic.svg" | ||
| docker compose run --rm php83 bin/poser poser "FOR THE BADGE" blue -s "for-the-badge" -p "doc/for-the-badge.svg" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,28 @@ | ||
| x-php-service: &php-service | ||
| working_dir: /application | ||
| stdin_open: true | ||
| volumes: | ||
| - .:/application:cached | ||
| environment: | ||
| - COMPOSER_HOME=/tmp/.composer | ||
|
|
||
| services: | ||
| php81: | ||
| <<: *php-service | ||
| build: | ||
| context: .docker/php81 | ||
| working_dir: /application | ||
| stdin_open: true | ||
| volumes: | ||
| - .:/application:cached | ||
|
|
||
| php82: | ||
| <<: *php-service | ||
| build: | ||
| context: .docker/php82 | ||
| working_dir: /application | ||
| stdin_open: true | ||
| volumes: | ||
| - .:/application:cached | ||
|
|
||
| php83: | ||
| <<: *php-service | ||
| build: | ||
| context: .docker/php83 | ||
| working_dir: /application | ||
| stdin_open: true | ||
| volumes: | ||
| - .:/application:cached | ||
|
|
||
| php84: | ||
| <<: *php-service | ||
| build: | ||
| context: .docker/php84 | ||
| working_dir: /application | ||
| stdin_open: true | ||
| volumes: | ||
| - .:/application:cached |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running tests with make will also validate the target works as expected