From 8aaac8884cd16a67ad1d059eac8334d3b9a29ad9 Mon Sep 17 00:00:00 2001 From: Saeed Vaziry Date: Sun, 3 Sep 2023 13:25:51 +0200 Subject: [PATCH] separate workflows --- .github/workflows/code-style.yml | 39 +++++++++++++++++++++ .github/workflows/{checks.yml => tests.yml} | 33 +---------------- 2 files changed, 40 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/code-style.yml rename .github/workflows/{checks.yml => tests.yml} (62%) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml new file mode 100644 index 0000000..1fada4f --- /dev/null +++ b/.github/workflows/code-style.yml @@ -0,0 +1,39 @@ +name: code-style + +on: + push: + pull_request: + schedule: + - cron: '0 0 * * *' + +jobs: + 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/checks.yml b/.github/workflows/tests.yml similarity index 62% rename from .github/workflows/checks.yml rename to .github/workflows/tests.yml index fe49d3d..60d0d6a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: checks +name: tests on: push: @@ -54,34 +54,3 @@ 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