From 88f26ce6a3159fcacd3a8d438dabd5c4643788d9 Mon Sep 17 00:00:00 2001 From: Saeed Vaziry Date: Sat, 2 Sep 2023 17:30:31 +0200 Subject: [PATCH] update workflows --- .../workflows/{style-check.yml => checks.yml} | 32 +++++++++++++++- .github/workflows/tests.yml | 37 ------------------- 2 files changed, 31 insertions(+), 38 deletions(-) rename .github/workflows/{style-check.yml => checks.yml} (61%) delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/style-check.yml b/.github/workflows/checks.yml similarity index 61% rename from .github/workflows/style-check.yml rename to .github/workflows/checks.yml index d610553..a35d37d 100644 --- a/.github/workflows/style-check.yml +++ b/.github/workflows/checks.yml @@ -1,4 +1,4 @@ -name: style-check +name: checks on: push: @@ -52,3 +52,33 @@ jobs: DB_DATABASE: test_db DB_USERNAME: user DB_PASSWORD: password + code-style: + runs-on: ubuntu-20.04 + + strategy: + fail-fast: true + matrix: + php: [ 8.1 ] + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run pint + run: ./vendor/bin/pint --test diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 50bf1ef..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: tests - -on: - push: - pull_request: - -jobs: - tests: - runs-on: ubuntu-20.04 - - strategy: - fail-fast: true - matrix: - php: [ 8.1 ] - - steps: - - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v2 - with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-php- - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress --no-suggest - - - name: Run pint - run: ./vendor/bin/pint --test