From 3fb76c2d2683d63cecfc27b1c6fe4f95c60c571c Mon Sep 17 00:00:00 2001 From: michaelachrisco Date: Tue, 18 Jun 2024 09:39:21 -0700 Subject: [PATCH] feat(build): Replace Circleci with GH Actions --- .circleci/config.yml | 27 ---------------------- .github/workflows/build.yml | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 27 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/build.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 164726b..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: 2.1 - -jobs: - build_php_version_82: - docker: - - image: cimg/php:8.2.12 - working_directory: ~/ReadOnlyTraitLaravel - steps: # a set of executable commands - - checkout - - run: sudo composer self-update - - run: composer install -n --prefer-dist --no-plugins - - run: ./vendor/bin/kahlan -reporter=verbose - build_php_version_83: - docker: - - image: cimg/php:8.3.0 - working_directory: ~/ReadOnlyTraitLaravel - steps: # a set of executable commands - - checkout - - run: sudo composer self-update - - run: composer install -n --prefer-dist --no-plugins - - run: ./vendor/bin/kahlan -reporter=verbose -workflows: - version: 2 - build: - jobs: - - build_php_version_82 - - build_php_version_83 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..125460d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: PHP Build + +on: + push: + branches: + - main + +jobs: + build_php_version_82: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up PHP 8.2 + uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + + - name: Install dependencies + run: | + sudo composer self-update + composer install -n --prefer-dist --no-plugins + + - name: Run tests + run: ./vendor/bin/kahlan -reporter=verbose + + build_php_version_83: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up PHP 8.3 + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + + - name: Install dependencies + run: | + sudo composer self-update + composer install -n --prefer-dist --no-plugins + + - name: Run tests + run: ./vendor/bin/kahlan -reporter=verbose