separate workflows

This commit is contained in:
Saeed Vaziry 2023-09-03 13:25:51 +02:00
parent 23bd26ceb5
commit 8aaac8884c
2 changed files with 40 additions and 32 deletions

39
.github/workflows/code-style.yml vendored Normal file
View File

@ -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

View File

@ -1,4 +1,4 @@
name: checks name: tests
on: on:
push: push:
@ -54,34 +54,3 @@ jobs:
DB_DATABASE: test_db DB_DATABASE: test_db
DB_USERNAME: user DB_USERNAME: user
DB_PASSWORD: password 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