aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/bshaffer/oauth2-server-php/.github/workflows/tests.yml
blob: 958f65765402d215cb7652f5b3355e60f0b6bfd2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Test Suite
on:
  push:
    branches:
      - master
  pull_request:
jobs:
  test:
    runs-on: ubuntu-latest
    services:
      redis:
        image: redis
        ports:
          - 6379:6379
        options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
      mongodb:
        image: mongo
        ports:
          - 27017:27017
      myriadb:
        image: mariadb
        env:
          MYSQL_ROOT_PASSWORD: root
        ports:
          - 3808:3808
          - 3306:3306
      postgres:
        image: postgres
        env:
          POSTGRES_DB: oauth2_server_php
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
        ports:
          - 5432:5432
        options: --health-cmd="pg_isready -h localhost" --health-interval=10s --health-timeout=5s --health-retries=5
    strategy:
      matrix:
        php: [ 7.1, 7.2, 7.3, 7.4, "8.0", 8.1 ]
    name: "PHP ${{ matrix.php }} Unit Test"
    steps:
      - uses: actions/checkout@v2
      - uses: codecov/codecov-action@v1
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: mongodb, mbstring, intl, redis, pdo_mysql
      - name: Install composer dependencies
        uses: nick-invision/retry@v1
        with:
          timeout_minutes: 10
          max_attempts: 3
          command: composer install
      - name: Run PHPUnit
        run: vendor/bin/phpunit -v