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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/.docker export-ignore
/.github export-ignore
/.hooks export-ignore
/coverage export-ignore
/tests export-ignore
.gitattributes export-ignore
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,40 @@ jobs:
- name: checkout repo
uses: actions/checkout@v4

- name: cache dependencies
uses: actions/cache@v4
with:
path: ./vendor
key: ${{ github.sha }}

- name: build app
run: make start

- name: validate dependencies
run: make composer c=validate

- name: install dependencies
run: make composer c=install

- name: audit dependencies
run: make composer c=audit

- name: run lint
run: make lint

- name: run tests
run: make test-cov

- name: upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

- name: upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
files: coverage/clover/clover.xml
file: ./coverage/junit.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
6 changes: 6 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jobs:
- name: checkout repo
uses: actions/checkout@v4

- name: cache vendor folder
uses: actions/cache@v4
with:
path: ./vendor
key: ${{ github.sha }}

- name: build app
run: make start

Expand Down
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,9 @@ vendor

###> phpunit/phpunit ###
coverage
phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

###> squizlabs/php_codesniffer ###
phpcs.xml
.phpcs-cache
.phpcs.cache
###< squizlabs/php_codesniffer ###

###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Contributors are always welcome! We want to make contributing to this project as

Pull requests are the best way to propose changes to the codebase. The ideal way to create a PR is:

1. Fork the repo and create your branch from the main version branch (e.g. `v1.x`).
1. Fork the repo and create your branch from the main version branch.
2. If you've added code that should be tested, add tests.
3. Ensure the test suite passes.
4. Make sure your code lints.
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS linux-headers \

COPY --from=composer /usr/bin/composer /usr/bin/composer

RUN git config --global --add safe.directory /app

CMD ["tail", "-f", "/dev/null"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test-cov-integration: ## Run integration tests and generate coverage report
@$(DOCKER_COMPOSE) exec -e XDEBUG_MODE=coverage app vendor/bin/phpunit --testsuite=integration --testdox --coverage-clover coverage/clover/clover.xml --coverage-html coverage/html

test-cov: ## Run all tests and generate coverage report
@$(DOCKER_COMPOSE) exec -e XDEBUG_MODE=coverage app vendor/bin/phpunit --testdox --coverage-clover coverage/clover/clover.xml --coverage-html coverage/html
@$(DOCKER_COMPOSE) exec -e XDEBUG_MODE=coverage app vendor/bin/phpunit --testdox --coverage-clover coverage/clover/clover.xml --coverage-html coverage/html --log-junit coverage/junit.xml

cov-unit: test-cov-unit cov-report ## Generate and open unit test coverage report

Expand Down
14 changes: 12 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
}
],
"require": {
"php": "^8.3"
"php": "^8.3",
"aws/aws-sdk-php": "^3.343",
"symfony/serializer": "^7.2",
"symfony/property-access": "^7.2"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.12",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^12.1"
"phpunit/phpunit": "^12.1",
"slevomat/coding-standard": "^8.18",
"symfony/var-dumper": "^7.2"
},
"autoload": {
"psr-4": {
Expand All @@ -25,5 +30,10 @@
"psr-4": {
"EduardoMarques\\DynamoPHP\\Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading