Skip to content

Commit

Permalink
does it make sense to run as separated job?
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Nov 2, 2023
1 parent 6de77f6 commit bcbc642
Showing 1 changed file with 47 additions and 10 deletions.
57 changes: 47 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ jobs:
job-description: 'with calculating code coverage'
calculate-code-coverage: 'yes'

- operating-system: 'ubuntu-20.04'
php-version: '8.2'
job-description: 'with deployment'
execute-deployment: 'yes'

- operating-system: 'ubuntu-20.04'
php-version: '8.3'
PHP_CS_FIXER_IGNORE_ENV: 1
Expand Down Expand Up @@ -167,8 +162,50 @@ jobs:
PHP_CS_FIXER_FUTURE_MODE: 1
run: php php-cs-fixer check --diff -v

- name: Execute deployment checks
if: matrix.execute-deployment == 'yes'
run: |
./dev-tools/build.sh
PHP_CS_FIXER_TEST_ALLOW_SKIPPING_SMOKE_TESTS=0 vendor/bin/phpunit tests/Smoke/
deployment-checks:
needs: tests
strategy:
fail-fast: false
matrix:
include:
- operating-system: 'ubuntu-20.04'
php-version: '8.2'

name: Deployment checks

runs-on: ${{ matrix.operating-system }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: none, dom, json, opcache, simplexml, tokenizer, xml, xmlwriter, zip
coverage: none

- name: Get Composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }}-${{ matrix.composer-flags }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }}-
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-
- name: Build phar
run: ./dev-tools/build.sh

- name: Run smoke tests
env:
PHP_CS_FIXER_TEST_ALLOW_SKIPPING_SMOKE_TESTS: 0
run: vendor/bin/phpunit tests/Smoke/

0 comments on commit bcbc642

Please sign in to comment.