Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 1446cf8

Browse files
committed
Running redis driver tests only on linux
1 parent 64d11c4 commit 1446cf8

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/workflows/run-tests.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ on: [push, pull_request]
55
jobs:
66
test:
77
runs-on: ${{ matrix.os }}
8-
services:
9-
redis:
10-
image: redis:${{ matrix.redis }}
11-
ports:
12-
- 6379:6379
13-
options: --entrypoint redis-server
148
strategy:
159
fail-fast: false
1610
matrix:
@@ -31,6 +25,11 @@ jobs:
3125
- name: Checkout code
3226
uses: actions/checkout@v1
3327

28+
- name: Setup Redis ${{ matrix.redis }}
29+
uses: supercharge/[email protected]
30+
with:
31+
redis-version: ${{ matrix.redis }}
32+
3433
- name: Cache dependencies
3534
uses: actions/cache@v1
3635
with:
@@ -49,10 +48,12 @@ jobs:
4948
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
5049
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
5150
52-
- name: Execute tests
53-
run: |
54-
REPLICATION_DRIVER=local phpunit --coverage-text --coverage-clover=coverage_local.xml
55-
REPLICATION_DRIVER=redis phpunit --coverage-text --coverage-clover=coverage_redis.xml
51+
- name: Execute tests with Local driver
52+
run: REPLICATION_DRIVER=local phpunit --coverage-text --coverage-clover=coverage_local.xml
53+
54+
- name: Execute tests with Redis driver
55+
run: REPLICATION_DRIVER=redis phpunit --coverage-text --coverage-clover=coverage_redis.xml
56+
if: ${{ matrix.os == 'ubuntu-latest' }}
5657

5758
- uses: codecov/codecov-action@v1
5859
with:

0 commit comments

Comments
 (0)