diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0ceab2f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Build + +on: [ push, pull_request ] + +jobs: + tests: + runs-on: "ubuntu-latest" + strategy: + matrix: + php-version: + - "8.2" + - "8.3" + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + php-version: "${{ matrix.php-version }}" + tools: "cs2pr" + + - name: "Install dependencies with Composer" + uses: "ramsey/composer-install@v2" + + - name: "Run phpcs" + if: ${{ matrix.php-version == '8.3' }} + run: "vendor/bin/phpcs -n -s --report=checkstyle | cs2pr" + + - name: "Run PHPUnit" + run: "vendor/bin/phpunit"