diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml new file mode 100644 index 0000000..b23b770 --- /dev/null +++ b/.github/workflows/backend-ci.yaml @@ -0,0 +1,46 @@ +name: Backend CI + +on: + push: + branches: + - '[0-9]+.[0-9]+' + - main + pull_request: ~ + workflow_dispatch: ~ + +jobs: + tests: + name: Tests + runs-on: "ubuntu-26.04" + timeout-minutes: 5 + + strategy: + fail-fast: false + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + + steps: + - uses: actions/checkout@v7 + + - uses: ibexa/gh-workflows/actions/composer-install@main + with: + php-version: ${{ matrix.php }} + gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }} + gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }} + satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }} + satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }} + + - name: Run PHPStan analysis + run: composer run-script phpstan + + - name: Run tests suite + run: composer run-script test + + - name: Run code style check + shell: bash + run: | + set -euo pipefail + composer run-script check-cs -- --format=checkstyle | cs2pr diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 3decb92..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: CI - -on: - push: - branches: - - '[0-9]+.[0-9]+' - - main - pull_request: ~ - -jobs: - tests: - name: Tests - runs-on: "ubuntu-22.04" - timeout-minutes: 5 - - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - - steps: - - uses: actions/checkout@v4 - - - name: Setup PHP Action - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: pdo_sqlite, gd - tools: cs2pr - - - uses: ramsey/composer-install@v3 - with: - dependency-versions: "highest" - composer-options: "--prefer-dist --no-progress --no-suggest" - - - name: Run PHPStan analysis - run: composer run-script phpstan - - - name: Run tests suite - run: composer run-script test - - - name: Run code style check - run: composer run-script check-cs -- --format=checkstyle | cs2pr diff --git a/.github/workflows/pr-check.yaml b/.github/workflows/pr-check.yaml new file mode 100644 index 0000000..d3413dc --- /dev/null +++ b/.github/workflows/pr-check.yaml @@ -0,0 +1,12 @@ +name: PR check +on: + pull_request: + types: + - opened + - synchronize + - reopened + - edited + +jobs: + test-base-branch: + uses: ibexa/gh-workflows/.github/workflows/pr-check.yml@main diff --git a/.github/workflows/reviewers.yaml b/.github/workflows/reviewers.yaml new file mode 100644 index 0000000..0c55d2d --- /dev/null +++ b/.github/workflows/reviewers.yaml @@ -0,0 +1,15 @@ +name: On PR Review Requested + +on: + pull_request: + types: [review_requested] + +jobs: + call-expand-team-reviewers: + if: ${{ github.event.requested_team }} + uses: ibexa/gh-workflows/.github/workflows/expand-team-reviewers.yml@main + with: + requested_team: ${{ github.event.requested_team.slug }} + pull_request_number: ${{ github.event.pull_request.number }} + repository: ${{ github.repository }} + secrets: inherit