From affaa47b05921356c69492fb7a8b8227a7762395 Mon Sep 17 00:00:00 2001 From: Gustavo Freze Date: Mon, 6 Jan 2025 22:38:15 -0300 Subject: [PATCH] fix: Fixes execution of composer scripts and updates dependencies. (#13) --- .github/workflows/auto-assign.yml | 11 +++++++---- LICENSE | 2 +- Makefile | 22 +++++++++++++++++++--- composer.json | 1 + 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml index 6a9bba4..b1c4e50 100644 --- a/.github/workflows/auto-assign.yml +++ b/.github/workflows/auto-assign.yml @@ -1,9 +1,12 @@ -name: Auto assign issues +name: Auto assign issues and pull requests on: issues: types: - opened + pull_request: + types: + - opened jobs: run: @@ -12,11 +15,11 @@ jobs: issues: write pull-requests: write steps: - - name: Assign issues - uses: gustavofreze/auto-assign@1.0.0 + - name: Assign issues and pull requests + uses: gustavofreze/auto-assign@1.1.4 with: assignees: '${{ secrets.ASSIGNEES }}' github_token: '${{ secrets.GITHUB_TOKEN }}' allow_self_assign: 'true' allow_no_assignees: 'true' - assignment_options: 'ISSUE' \ No newline at end of file + assignment_options: 'ISSUE,PULL_REQUEST' \ No newline at end of file diff --git a/LICENSE b/LICENSE index 46fc4c0..6bfc7b1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022-2024 Tiny Blocks +Copyright (c) 2022-2025 Tiny Blocks Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index e93c1fa..96ccd27 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,19 @@ -DOCKER_RUN = docker run --rm -it --net=host -v ${PWD}:/app -w /app gustavofreze/php:8.3 +ifeq ($(OS),Windows_NT) + PWD := $(shell cd) +else + PWD := $(shell pwd -L) +endif -.PHONY: configure test test-no-coverage review show-reports clean +ARCH := $(shell uname -m) +PLATFORM := + +ifeq ($(ARCH),arm64) + PLATFORM := --platform=linux/amd64 +endif + +DOCKER_RUN = docker run ${PLATFORM} --rm -it --net=host -v ${PWD}:/app -w /app gustavofreze/php:8.3 + +.PHONY: configure test test-file test-no-coverage review show-reports clean configure: @${DOCKER_RUN} composer update --optimize-autoloader @@ -8,6 +21,9 @@ configure: test: @${DOCKER_RUN} composer tests +test-file: + @${DOCKER_RUN} composer test-file ${FILE} + test-no-coverage: @${DOCKER_RUN} composer tests-no-coverage @@ -19,4 +35,4 @@ show-reports: clean: @sudo chown -R ${USER}:${USER} ${PWD} - @rm -rf report vendor .phpunit.cache .lock + @rm -rf report vendor .phpunit.cache *.lock diff --git a/composer.json b/composer.json index 19d8b4e..e75343e 100644 --- a/composer.json +++ b/composer.json @@ -56,6 +56,7 @@ "phpcs": "phpcs --standard=PSR12 --extensions=php ./src", "phpmd": "phpmd ./src text phpmd.xml --suffixes php --ignore-violations-on-exit", "phpstan": "phpstan analyse -c phpstan.neon.dist --quiet --no-progress", + "test-file": "phpunit --configuration phpunit.xml --no-coverage --filter", "mutation-test": "infection --only-covered --threads=max --logger-html=report/coverage/mutation-report.html --coverage=report/coverage", "test-no-coverage": "phpunit --configuration phpunit.xml --no-coverage tests", "review": [