From 5f0df03f50bce89ae9ae480d3fa231de2eadd7ac Mon Sep 17 00:00:00 2001 From: "package-sync[bot]" <165811605+package-sync[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 19:51:32 +0300 Subject: [PATCH] chore: Sync changes from the template (#33) Co-authored-by: oprypkhantc <54406427+oprypkhantc@users.noreply.github.com> --- .github/workflows/release.yml | 3 +-- .github/workflows/template-sync.yml | 25 ++++++++++++++++++++++--- .github/workflows/tests.yml | 19 ++++++++++++++----- 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a5a7b4..a48876e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,8 +15,7 @@ on: jobs: release: name: Release - runs-on: packages - container: node:22 + runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: Checkout diff --git a/.github/workflows/template-sync.yml b/.github/workflows/template-sync.yml index f904f79..63c2f16 100644 --- a/.github/workflows/template-sync.yml +++ b/.github/workflows/template-sync.yml @@ -21,11 +21,30 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Reformat - uses: actionsx/prettier@v2 + - name: Reformat using Prettier + uses: actionsx/prettier@v3 with: args: --write . + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + extensions: dom, libxml, mbstring + tools: composer:v2 + coverage: none + + - name: Composer cache + uses: actions/cache@v3 + with: + path: vendor + key: composer-${{ hashFiles('composer.json') }} + + - name: Reformat using php-cs-fixer + run: | + composer install + composer cs-fix + - name: Generate token to read from source repo id: generate_token uses: tibdex/github-app-token@v1 @@ -52,7 +71,7 @@ jobs: workflow-keepalive: name: Workflow keepalive runs-on: packages - container: node:22 + container: maniator/gh:v2.48.0 if: github.event_name == 'schedule' permissions: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 01dd264..500babb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,15 @@ name: Tests -on: [pull_request] +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + - next + - next-major + - beta + - alpha jobs: phpunit: @@ -21,7 +30,7 @@ jobs: uses: actions/cache@v3 with: path: vendor - key: composer-${{ runner.os }}-${{ hashFiles('composer.json') }} + key: composer-${{ hashFiles('composer.json') }} - name: Install dependencies run: | @@ -43,7 +52,7 @@ jobs: uses: actions/cache@v3 with: path: vendor - key: composer-${{ runner.os }}-${{ hashFiles('composer.json') }} + key: composer-${{ hashFiles('composer.json') }} - name: Install dependencies run: composer install --prefer-dist --no-progress @@ -61,7 +70,7 @@ jobs: uses: actions/checkout@v3 - name: Run prettier - uses: actionsx/prettier@v2 + uses: actionsx/prettier@v3 with: args: --check . @@ -83,7 +92,7 @@ jobs: uses: actions/cache@v3 with: path: vendor - key: composer-${{ runner.os }}-${{ hashFiles('composer.json') }} + key: composer-${{ hashFiles('composer.json') }} - name: Install dependencies run: |