From 6613be383217ba560aea69fcc571856cbd4f9ef5 Mon Sep 17 00:00:00 2001 From: Flavio Schoute Date: Sun, 11 Aug 2024 20:24:13 +0200 Subject: [PATCH 1/3] Update github actions workflow --- .github/workflows/format_php.yml | 26 ----------- .github/workflows/run-test-and-format.yml | 53 +++++++++++++++++++++++ .github/workflows/run-tests-api.yml | 22 ---------- 3 files changed, 53 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows/format_php.yml create mode 100644 .github/workflows/run-test-and-format.yml delete mode 100644 .github/workflows/run-tests-api.yml diff --git a/.github/workflows/format_php.yml b/.github/workflows/format_php.yml deleted file mode 100644 index 97fbea0..0000000 --- a/.github/workflows/format_php.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Format (PHP) - -on: - push: - branches: - - '**' - -jobs: - php-cs-fixer: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: nanasess/setup-php@master - with: - php-version: '8.1' - - name: Install Dependencies - run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress - - name: Composer dump-autoload - run: composer dump-autoload - - name: Make phpunit cache dir - run: mkdir -p /home/runner/work/sdk-php/sdk-php/.php.cache - - name: Run php-cs-fixer - run: ./vendor/bin/php-cs-fixer fix - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: php-cs-fixer changes \ No newline at end of file diff --git a/.github/workflows/run-test-and-format.yml b/.github/workflows/run-test-and-format.yml new file mode 100644 index 0000000..97eaf45 --- /dev/null +++ b/.github/workflows/run-test-and-format.yml @@ -0,0 +1,53 @@ +name: Run tests & format + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +jobs: + test: + name: Run tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: nanasess/setup-php@master + with: + php-version: 8.1 + + - name: Install Dependencies + run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress + + - name: Composer dump-autoload + run: composer dump-autoload + + - name: Execute tests (Unit and Feature tests) via PHPUnit + run: vendor/phpunit/phpunit/phpunit Tests + + format: + name: Fix PHP Coding Style + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: nanasess/setup-php@master + with: + php-version: 8.1 + + - name: Install Dependencies + run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress + + - name: Composer dump-autoload + run: composer dump-autoload + + - name: Run php-cs-fixer + run: ./vendor/bin/php-cs-fixer fix + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Apply php-cs-fixer changes diff --git a/.github/workflows/run-tests-api.yml b/.github/workflows/run-tests-api.yml deleted file mode 100644 index 159afea..0000000 --- a/.github/workflows/run-tests-api.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Run tests SDK - -on: - push: - branches: - - '**' - -jobs: - sdk-tests: - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: nanasess/setup-php@master - with: - php-version: '8.1' - - name: Install Dependencies - run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress - - name: Composer dump-autoload - run: composer dump-autoload - - name: Execute tests (Unit and Feature tests) via PHPUnit - run: vendor/phpunit/phpunit/phpunit Tests From 08de32234d7a08e75a06bb634350ba1209511955 Mon Sep 17 00:00:00 2001 From: Flavio Schoute Date: Mon, 12 Aug 2024 17:06:14 +0200 Subject: [PATCH 2/3] Demo --- src/Contract/ClientDeleteInterface.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Contract/ClientDeleteInterface.php b/src/Contract/ClientDeleteInterface.php index 746d9d0..f372fef 100644 --- a/src/Contract/ClientDeleteInterface.php +++ b/src/Contract/ClientDeleteInterface.php @@ -9,4 +9,6 @@ interface ClientDeleteInterface { public function delete(string $path): Response; + + public function demo(string $path): Response; } From cb22b125f1254778b167ab02bca56914e1287b77 Mon Sep 17 00:00:00 2001 From: Flavio Schoute Date: Mon, 12 Aug 2024 17:06:51 +0200 Subject: [PATCH 3/3] Revert demo --- src/Contract/ClientDeleteInterface.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Contract/ClientDeleteInterface.php b/src/Contract/ClientDeleteInterface.php index f372fef..746d9d0 100644 --- a/src/Contract/ClientDeleteInterface.php +++ b/src/Contract/ClientDeleteInterface.php @@ -9,6 +9,4 @@ interface ClientDeleteInterface { public function delete(string $path): Response; - - public function demo(string $path): Response; }