Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | name: run-tests |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | pull_request: |
| 6 | schedule: |
| 7 | - cron: "0 0 * * *" |
| 8 | |
| 9 | jobs: |
| 10 | run-tests: |
| 11 | runs-on: ${{ matrix.os }} |
| 12 | strategy: |
| 13 | fail-fast: false |
| 14 | matrix: |
| 15 | os: [ubuntu-latest, windows-latest] |
| 16 | php: [8.0, 7.4, 7.3] |
| 17 | |
| 18 | name: ${{ matrix.os }} - P${{ matrix.php }} |
| 19 | |
| 20 | steps: |
| 21 | - name: Checkout code |
| 22 | uses: actions/checkout@v2 |
| 23 | |
| 24 | - name: Cache dependencies |
| 25 | uses: actions/cache@v2 |
| 26 | with: |
| 27 | path: ~/.composer/cache/files |
| 28 | key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} |
| 29 | |
| 30 | - name: Setup PHP |
| 31 | uses: shivammathur/setup-php@v2 |
| 32 | with: |
| 33 | php-version: ${{ matrix.php }} |
| 34 | extensions: ldap, json |
| 35 | coverage: none |
| 36 | |
| 37 | - name: Install dependencies |
| 38 | run: composer update --prefer-dist --no-interaction |
| 39 | |
| 40 | - name: Execute tests |
| 41 | run: vendor/bin/phpunit |