refactor: standardize Session ID return types, improve encryption key… #44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ "dev" ] | |
| pull_request: | |
| branches: [ "dev" ] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| GIT_SSL_NO_VERIFY: "true" | |
| jobs: | |
| tests: | |
| needs: [cs, phpstan, psalm, rector] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| extensions: intl, mbstring, sqlite3, json, mysqli, pdo_mysql, curl | |
| coverage: pcov | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run PHPUnit | |
| run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml | |
| - name: Coveralls GitHub Action | |
| uses: coverallsapp/github-action@v2.3.6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| file: build/logs/clover.xml | |
| format: clover | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
| integration: | |
| needs: [tests] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.2', '8.3', '8.4', '8.5'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP ${{ matrix.php }} | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: intl, mbstring, sqlite3, json, pdo_sqlite, curl | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run CI setup (environment check, database, seed) | |
| run: php scripts/ci_setup.php | |
| - name: Run PHPUnit | |
| run: php -d error_reporting='E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED' vendor/bin/phpunit | |
| cs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| extensions: intl, mbstring, sqlite3, json, mysqli, pdo_mysql, curl | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Check Coding Standards | |
| run: vendor/bin/php-cs-fixer fix --dry-run --verbose --ansi | |
| phpstan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| extensions: intl, mbstring, sqlite3, json, mysqli, pdo_mysql, curl | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run PHPStan | |
| run: vendor/bin/phpstan analyse -c phpstan.neon | |
| psalm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| extensions: intl, mbstring, sqlite3, json, mysqli, pdo_mysql, curl | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run Psalm | |
| run: vendor/bin/psalm -c psalm.xml | |
| rector: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| extensions: intl, mbstring, sqlite3, json, mysqli, pdo_mysql, curl | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run Rector | |
| run: vendor/bin/rector process --dry-run | |
| merge_to_main: | |
| needs: [integration] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| # Only run on push to dev (not on PRs) | |
| if: github.ref == 'refs/heads/dev' && github.event_name == 'push' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Merge dev to main | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git checkout -B master origin/master | |
| git merge origin/dev | |
| git push origin master |