diff --git a/.github/workflows/app-ci.yaml b/.github/workflows/app-ci.yaml index 9cf70c4..53843b6 100644 --- a/.github/workflows/app-ci.yaml +++ b/.github/workflows/app-ci.yaml @@ -42,4 +42,11 @@ jobs: - name: Run automated tests run: vendor/bin/phpunit + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: coverage/clover.xml + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d3e4fae --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Contributing + +This repository includes a lightweight container workflow to run tests and analysis in a reproducible environment. + +- Build image: `make build` (requires Docker and Docker Compose) +- Open shell in running container: `make shell` + +Guidelines for contributing improvements: + +- Install dependencies via `composer install` from within the development container +- Run the QA suite locally before opening a PR: `composer qa` (runs PHPStan, php-cs-fixer and PHPUnit). +- Prefer adding unit tests for new features or bug fixes; tests are in `tests/Unit`. +- Follow PHPStan and php-cs-fixer rules. Running `composer cs` will apply fixer changes. +- If you use the container workflow, prefer running tests inside the container to match CI. +- Open pull requests targeting the `master` branch with a clear description of the change and a short test plan. diff --git a/Makefile b/Makefile index a03bbeb..d752723 100644 --- a/Makefile +++ b/Makefile @@ -11,14 +11,11 @@ up: down: @docker compose down -# Run all QA scripts in the container qa: - @docker compose exec tactix composer qa + @docker compose exec -it $(CONTAINER_NAME) composer qa -# Run PHPUnit inside the container test: - @docker compose exec tactix vendor/bin/phpunit --configuration phpunit.xml.dist $(TESTARGS) + @docker compose exec -it $(CONTAINER_NAME) vendor/bin/phpunit --configuration phpunit.xml.dist $(TESTARGS) -# Open an interactive shell in the running container shell: @docker compose exec -it $(CONTAINER_NAME) sh diff --git a/README.md b/README.md index 3356142..7ab4b1c 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ # Tactix  +[](https://codecov.io/github/makomweb/tactix) -Tactical DDD, simplified for PHP: tag your classes (via PHP attributes) and validate missing tags + forbidden relations. +Tactical DDD, simplified for PHP: tag your classes (via PHP attributes) forbidden relations.