Skip to content

Commit

Permalink
Remove Symfony 6 hacks (#12)
Browse files Browse the repository at this point in the history
* Remove Symfony 6 hacks

* move e2e tests to independent job

* fix job name
  • Loading branch information
sidz committed Oct 15, 2023
1 parent e9be902 commit 9cccc6c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 18 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/ci.yaml
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
coverage: ${{ matrix.coverage-driver }}
tools: composer:v2
tools: composer:v2, flex

- name: Get composer cache directory
id: composer-cache
Expand All @@ -52,25 +52,17 @@ jobs:
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-
- name: Configure Symfony v6@dev hacks
if: matrix.symfony-require == '^6'
run: |
composer config minimum-stability beta
- name: Configure Symfony Flex
run: composer config extra.symfony.require ${{ matrix.symfony-require }}

- name: Install dependencies
run: composer update --optimize-autoloader --no-interaction --no-progress --prefer-dist

- name: Run tests and generate coverage
run: make test-unit

- name: Run E2E tests
env:
TERM: xterm-256color
run: make test-e2e

- name: Upload coverage results to Coveralls
if: matrix.symfony-require != '^6'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: vendor/bin/php-coveralls
38 changes: 38 additions & 0 deletions .github/workflows/e2e-tests.yaml
@@ -0,0 +1,38 @@
# yamllint disable rule:line-length
# yamllint disable rule:braces

name: E2E Tests

on:
pull_request:
push:
branches:
- main
- master

jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
php-version: [ '7.4', '8.0', '8.1' ]
coverage-driver: [ pcov ]

name: CI with PHP ${{ matrix.php-version }}, using ${{ matrix.coverage-driver }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: ${{ matrix.coverage-driver }}
tools: composer:v2

- name: Run E2E tests
env:
TERM: xterm-256color
run: make test-e2e
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9cccc6c

Please sign in to comment.