|
| 1 | +name: Backend build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - '[0-9]+.[0-9]+' |
| 8 | + pull_request: ~ |
| 9 | + |
| 10 | +jobs: |
| 11 | + cs-fix: |
| 12 | + name: Run code style check |
| 13 | + runs-on: "ubuntu-22.04" |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + php: |
| 17 | + - '8.1' |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v3 |
| 20 | + |
| 21 | + - name: Setup PHP Action |
| 22 | + uses: shivammathur/setup-php@v2 |
| 23 | + with: |
| 24 | + php-version: ${{ matrix.php }} |
| 25 | + coverage: none |
| 26 | + extensions: 'pdo_sqlite, gd' |
| 27 | + tools: cs2pr |
| 28 | + |
| 29 | + - uses: ramsey/composer-install@v2 |
| 30 | + with: |
| 31 | + dependency-versions: "highest" |
| 32 | + |
| 33 | + - name: Run code style check |
| 34 | + run: composer run-script check-cs -- --format=checkstyle | cs2pr |
| 35 | + |
| 36 | + deptrac: |
| 37 | + name: Deptrac |
| 38 | + runs-on: ubuntu-latest |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v3 |
| 41 | + - name: Deptrac |
| 42 | + uses: smoench/deptrac-action@master |
| 43 | + |
| 44 | + tests: |
| 45 | + name: Tests |
| 46 | + runs-on: "ubuntu-22.04" |
| 47 | + timeout-minutes: 10 |
| 48 | + |
| 49 | + strategy: |
| 50 | + fail-fast: false |
| 51 | + matrix: |
| 52 | + php: |
| 53 | + - '7.4' |
| 54 | + - '8.1' |
| 55 | + - '8.2' |
| 56 | + |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@v2 |
| 59 | + |
| 60 | + - name: Setup PHP Action |
| 61 | + uses: shivammathur/setup-php@v2 |
| 62 | + with: |
| 63 | + php-version: ${{ matrix.php }} |
| 64 | + coverage: none |
| 65 | + extensions: pdo_sqlite, gd |
| 66 | + tools: cs2pr |
| 67 | + |
| 68 | + - uses: "ramsey/composer-install@v1" |
| 69 | + with: |
| 70 | + dependency-versions: "highest" |
| 71 | + composer-options: "--prefer-dist --no-progress --no-suggest" |
| 72 | + |
| 73 | + - name: Setup problem matchers for PHPUnit |
| 74 | + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
| 75 | + |
| 76 | + - name: Run PHPStan analysis |
| 77 | + run: composer run-script phpstan |
| 78 | + |
| 79 | + - name: Run test suite |
| 80 | + run: composer run-script --timeout=600 test |
0 commit comments