From 0695ea5d33c705e64df48c05d36ff7c5040e1093 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 21 May 2020 23:00:16 +0200 Subject: [PATCH] chore: runs formats testing in ubuntu only --- .github/workflows/{ci.yml => formats.yml} | 12 ++----- .github/workflows/tests.yml | 44 +++++++++++++++++++++++ 2 files changed, 47 insertions(+), 9 deletions(-) rename .github/workflows/{ci.yml => formats.yml} (75%) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/formats.yml similarity index 75% rename from .github/workflows/ci.yml rename to .github/workflows/formats.yml index bac8a7a9..5201031d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/formats.yml @@ -9,11 +9,11 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, windows-latest] - php: [7.3, 7.4] + os: [ubuntu-latest] + php: [7.4] dependency-version: [prefer-lowest, prefer-stable] - name: CI - PHP ${{ matrix.php }} (${{ matrix.dependency-version }}) - ${{ matrix.os }} + name: Formats ${{ matrix.php }} (${{ matrix.dependency-version }}) - ${{ matrix.os }} steps: @@ -44,9 +44,3 @@ jobs: - name: Type Checks run: vendor/bin/phpstan analyse --ansi - - - name: Unit Tests - run: bin/pest --colors=always --exclude-group=integration - - - name: Integration Tests - run: bin/pest --colors=always --group=integration diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..9f31b601 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,44 @@ +name: Continuous Integration + +on: ['push', 'pull_request'] + +jobs: + ci: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + php: [7.3, 7.4] + dependency-version: [prefer-lowest, prefer-stable] + + name: Tests ${{ matrix.php }} (${{ matrix.dependency-version }}) - ${{ matrix.os }} + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: mbstring, zip + tools: prestissimo + coverage: pcov + + - name: Install Composer dependencies + run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist + + - name: Unit Tests + run: bin/pest --colors=always --exclude-group=integration + + - name: Integration Tests + run: bin/pest --colors=always --group=integration