|
8 | 8 |
|
9 | 9 | strategy: |
10 | 10 | matrix: |
11 | | - php: [5.6, 7.0, 7.1, 7.4, 8.0] |
| 11 | + php: [7.3, 7.4, 8.0] |
| 12 | + laravel: [8] |
12 | 13 |
|
13 | 14 | steps: |
14 | | - - name: Checkout code |
15 | | - uses: actions/checkout@v2 |
16 | | - |
17 | | - - name: Setup PHP |
18 | | - uses: shivammathur/setup-php@v2 |
19 | | - with: |
20 | | - php-version: ${{ matrix.php }} |
21 | | - extensions: zip, pdo, sqlite |
22 | | - coverage: none |
23 | | - |
24 | | - - name: Checkout Laravel Sample |
25 | | - uses: actions/checkout@v2 |
26 | | - with: |
27 | | - repository: codeception/codeception-laravel5-sample |
28 | | - path: framework-tests |
29 | | - ref: codeception-4.1 |
30 | | - |
31 | | - - name: Install Laravel Sample |
32 | | - run: | |
33 | | - composer remove --no-update --dev codeception/module-laravel5 |
34 | | - composer update --no-dev --prefer-dist --no-interaction |
35 | | - cp .env.testing .env |
36 | | - touch storage/testing.sqlite |
37 | | - php artisan migrate --env=testing --database=sqlite_testing --force |
38 | | - php artisan config:clear |
39 | | - working-directory: framework-tests |
40 | | - |
41 | | - - name: Validate composer.json and composer.lock |
42 | | - run: composer validate |
43 | | - |
44 | | - - name: Install dependencies |
45 | | - run: composer install --prefer-dist --no-progress --no-interaction --no-suggest |
46 | | - |
47 | | - - name: Run test suite |
48 | | - run: | |
49 | | - php vendor/bin/codecept build -c framework-tests |
50 | | - php vendor/bin/codecept run functional -c framework-tests |
| 15 | + - name: Checkout code |
| 16 | + uses: actions/checkout@v2 |
| 17 | + |
| 18 | + - name: Setup PHP |
| 19 | + uses: shivammathur/setup-php@v2 |
| 20 | + with: |
| 21 | + php-version: ${{ matrix.php }} |
| 22 | + tools: composer:v2 |
| 23 | + extensions: ctype, iconv, intl, json, mbstring, pdo, pdo_sqlite |
| 24 | + coverage: none |
| 25 | + |
| 26 | + - name: Checkout Laravel 8 Sample |
| 27 | + if: matrix.laravel == 8 |
| 28 | + uses: actions/checkout@v2 |
| 29 | + with: |
| 30 | + repository: codeception/laravel-module-tests |
| 31 | + submodules: recursive |
| 32 | + ref: main |
| 33 | + |
| 34 | + - name: Validate composer.json and composer.lock |
| 35 | + run: composer validate |
| 36 | + |
| 37 | + - name: Get composer cache directory |
| 38 | + id: composer-cache |
| 39 | + run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 40 | + |
| 41 | + - name: Cache composer dependencies |
| 42 | + uses: actions/cache@v2.1.3 |
| 43 | + with: |
| 44 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 45 | + key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} |
| 46 | + restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- |
| 47 | + |
| 48 | + - name: Install Laravel Sample |
| 49 | + run: composer update --no-progress |
| 50 | + |
| 51 | + - name: Prepare the test environment and run test suite |
| 52 | + run: | |
| 53 | + cp .env.testing .env |
| 54 | + php artisan config:cache |
| 55 | + touch database/database.sqlite |
| 56 | + php artisan migrate --seed --env=testing --force |
| 57 | + php vendor/bin/codecept run Functional |
0 commit comments