Update SDK #38
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: Tests | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: [ '7.4', '8.0','8.1', '8.2', '8.3' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Check PHP Version | |
run: php -v | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-build-${{ matrix.php-versions }}-${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ matrix.php-versions }}- | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
# We run `--no-scripts` to avoid using Strauss during unit tests | |
env: | |
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' | |
run: composer install --prefer-dist --no-progress --no-scripts | |
- name: Run linter | |
run: composer run-script linter | |
- name: Run test suite | |
run: composer run-script test | |
- name: Run Code Sniffer | |
run: composer run-script sniffer | |
- name: Run static analysis | |
run: composer run-script analyse |