From 06c645f0641ec45d201c9c06cc2109fae6565017 Mon Sep 17 00:00:00 2001 From: Tristan Date: Sun, 1 Dec 2024 11:35:01 +0100 Subject: [PATCH] Use GH Action instead of drone --- .drone.yml | 37 --------------------- .github/workflows/ci.yml | 69 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 37 deletions(-) delete mode 100644 .drone.yml create mode 100644 .github/workflows/ci.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 6a8bfa2..0000000 --- a/.drone.yml +++ /dev/null @@ -1,37 +0,0 @@ -kind: pipeline -type: docker -name: default - -steps: -- name: install - image: composer - commands: - - composer install - -- name: phpstan - image: php:8.4 - depends_on: - - install - commands: - - vendor/bin/phpstan analyse - -- name: rector - image: php:8.4 - depends_on: - - install - commands: - - vendor/bin/rector process --dry-run - -- name: pest - image: php:8.4 - depends_on: - - install - commands: - - vendor/bin/pest - -- name: style check - image: php:8.4 - depends_on: - - install - commands: - - vendor/bin/php-cs-fixer fix diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a13ecef --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,69 @@ +name: CI Pipeline + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + install: + runs-on: ubuntu-latest + container: + image: composer:latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Install Dependencies + run: composer install + + phpstan: + runs-on: ubuntu-latest + needs: install + container: + image: php:8.4 + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: PHPStan Analysis + run: vendor/bin/phpstan analyse + + rector: + runs-on: ubuntu-latest + needs: install + container: + image: php:8.4 + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Rector Dry Run + run: vendor/bin/rector process --dry-run + + pest: + runs-on: ubuntu-latest + needs: install + container: + image: php:8.4 + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Run Pest Tests + run: vendor/bin/pest + + style-check: + runs-on: ubuntu-latest + needs: install + container: + image: php:8.4 + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: PHP CS Fixer + run: vendor/bin/php-cs-fixer fix