|
38 | 38 | matrix:
|
39 | 39 | operating-system: [ubuntu-latest, windows-latest]
|
40 | 40 | php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
|
41 |
| - name: Tests for PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} |
| 41 | + name: Unit Tests for PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} |
42 | 42 | steps:
|
43 | 43 | - name: Checkout
|
44 | 44 | uses: actions/checkout@v2
|
|
71 | 71 |
|
72 | 72 | - name: Run Tests
|
73 | 73 | run: composer test-spec
|
| 74 | + |
| 75 | + integration-tests: |
| 76 | + runs-on: ${{ matrix.operating-system }} |
| 77 | + strategy: |
| 78 | + fail-fast: false |
| 79 | + matrix: |
| 80 | + operating-system: [ubuntu-latest] |
| 81 | + php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] |
| 82 | + name: Integration Tests for PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} |
| 83 | + steps: |
| 84 | + - name: Checkout |
| 85 | + uses: actions/checkout@v2 |
| 86 | + |
| 87 | + - name: Setup PHP |
| 88 | + uses: shivammathur/setup-php@v2 |
| 89 | + with: |
| 90 | + php-version: ${{ matrix.php-versions }} |
| 91 | + tools: composer:v2 |
| 92 | + coverage: pcov |
| 93 | + |
| 94 | + - name: Start SNMP Container |
| 95 | + run: | |
| 96 | + docker run --name snmpd -d -p 10161:161/udp polinux/snmpd |
| 97 | +
|
| 98 | + - name: Get Composer Cache Directory |
| 99 | + id: composer-cache |
| 100 | + run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 101 | + |
| 102 | + - name: Install Composer dependencies |
| 103 | + if: ${{ matrix.php-versions != '8.1' }} |
| 104 | + run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader |
| 105 | + |
| 106 | + - name: Install Composer dependencies (8.1) |
| 107 | + if: ${{ matrix.php-versions == '8.1' }} |
| 108 | + run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader --ignore-platform-reqs |
| 109 | + |
| 110 | + - name: Cache dependencies |
| 111 | + uses: actions/cache@v1 |
| 112 | + with: |
| 113 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 114 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 115 | + restore-keys: ${{ runner.os }}-composer- |
| 116 | + |
| 117 | + - name: Run Tests |
| 118 | + run: composer test-integration |
0 commit comments