FlagSets support #100
Workflow file for this run
This file contains 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: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_number || github.event.pull_request.number }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Run unit tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '7.3' | |
- '8.2' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.version }} | |
extensions: mbstring, intl, pcntl, sockets | |
ini-values: post_max_size=256M, max_execution_time=180 | |
coverage: pcov | |
- name: Install dependencies | |
run: | | |
composer install --prefer-dist | |
composer update | |
- name: Print max send & receive buffers (for reference) | |
run: | | |
echo "Max recv buffer size: $(cat /proc/sys/net/core/rmem_max)" | |
echo "Max send buffer size: $(cat /proc/sys/net/core/wmem_max)" | |
- name: Test | |
env: | |
DEBUG: true | |
GHA: true | |
run: | | |
make test ARGS='-v' | |
- name: Set VERSION env | |
run: echo "VERSION=$(cat src/Version.php | grep 'const CURRENT' | cut -d "'" -f 2 | sed "s/'//g")" >> $GITHUB_ENV | |
- name: SonarQube Scan | |
if: matrix.version == '8.2' | |
uses: SonarSource/[email protected] | |
env: | |
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
projectBaseDir: . | |
args: > | |
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} | |
-Dsonar.projectVersion=${{ env.VERSION }} |