From dcaab75e7b699ac5858b6c463ce6fb822e415f09 Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Sat, 19 Oct 2024 15:12:07 +0100 Subject: [PATCH] chore: remove obsolete workflow files and create a new pipeline (main) Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- .github/workflows/compile-assets.yml | 28 ---------------- .github/workflows/pint.yml | 29 ----------------- .github/workflows/pipeline.yml | 20 ++++++++++++ .github/workflows/static-analysis.yml | 33 ------------------- .github/workflows/tests.yml | 47 --------------------------- 5 files changed, 20 insertions(+), 137 deletions(-) delete mode 100644 .github/workflows/compile-assets.yml delete mode 100644 .github/workflows/pint.yml create mode 100644 .github/workflows/pipeline.yml delete mode 100644 .github/workflows/static-analysis.yml delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/compile-assets.yml b/.github/workflows/compile-assets.yml deleted file mode 100644 index 459414fb..00000000 --- a/.github/workflows/compile-assets.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Compile Assets - -on: [ push, workflow_dispatch ] - -jobs: - compile: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - uses: actions/setup-node@v3 - - - name: Install NPM dependencies - run: npm install -g bower && npm ci --ignore-scripts - - - name: Compile assets - run: npm run prod - - - name: Commit compiled files - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Compile Assets - file_pattern: public diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml deleted file mode 100644 index d6c0b0fd..00000000 --- a/.github/workflows/pint.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: PHP Linting (Pint) - -on: [ push, pull_request, workflow_dispatch ] - -jobs: - php-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - tools: composer:v2 - coverage: none - - - name: Composer Install - run: composer install --no-interaction --ignore-platform-reqs - - - name: Run Laravel Pint - run: composer format - - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: PHP Linting (Pint) - Fix styling - skip_fetch: true diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 00000000..06ed70a0 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,20 @@ +name: Core Pipeline + +on: [ push, pull_request, workflow_dispatch ] + +jobs: + build-assets: + uses: tastyigniter/workflows/.github/workflows/build-assets.yml@main + php-lint: + needs: build-assets + if: ${{ always() && needs.build-assets.result == 'success' }} + uses: tastyigniter/workflows/.github/workflows/php-lint.yml@main + php-tests: + needs: php-lint + if: ${{ always() && needs.php-lint.result == 'success' }} + strategy: + matrix: + php: [ '8.2', '8.3' ] + uses: tastyigniter/workflows/.github/workflows/php-tests.yml@main + with: + php-version: ${{ matrix.target }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml deleted file mode 100644 index fbad101b..00000000 --- a/.github/workflows/static-analysis.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: "Static Analysis" - -on: [ push, pull_request, workflow_dispatch ] - -jobs: - static-analysis: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: [ "8.2", "8.3" ] - name: PHP ${{ matrix.php }} - Static Analysis - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, fileinfo - tools: composer:v2 - coverage: none - - - name: Install dependencies - uses: nick-fields/retry@v2 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute static analysis - run: composer static diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 30ddcaee..00000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Tests - -on: [ push, pull_request, workflow_dispatch ] - -jobs: - PestTests: - runs-on: ubuntu-latest - strategy: - matrix: - php: [ '8.2', '8.3' ] - - services: - mysql: - image: 'mysql:8.0' - ports: - - 3306 - - name: 'PHP Tests ${{ matrix.php }}' - - steps: - - name: Checkout changes - uses: actions/checkout@v1 - - - name: Create MySQL Database - run: | - sudo systemctl start mysql - mysql -u${{ env.DB_USERNAME }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' --port ${{ env.DB_PORT }} - - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php }} - extensions: mbstring, intl, gd, xml, sqlite - - - name: Install composer dependencies - run: composer install --no-interaction --prefer-dist --no-progress --no-scripts - - - name: Run Pest Test Suite - run: composer test - - env: - DB_PORT: 3306 - DB_DATABASE: testbench - DB_USERNAME: root - DB_PASSWORD: root - DB_PREFIX: 'ti_' - IGNITER_LOCATION_MODE: multiple