diff --git a/.github/run-tests.yml b/.github/run-tests.yml new file mode 100644 index 0000000..5797fae --- /dev/null +++ b/.github/run-tests.yml @@ -0,0 +1,30 @@ +name: Run tests +on: + pull_request: + push: + branches: [main] +jobs: + test: + name: PHP ${{ matrix.php }} + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental }} + strategy: + fail-fast: false + matrix: + php: ['7.4', '8.0'] + experimental: [false] + include: + - php: '8.1' + experimental: true + steps: + - uses: actions/checkout@v2 + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + - uses: actions/cache@v2 + with: + path: ~/.composer/cache/files + key: php${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} + restore-keys: php${{ matrix.php }}- + - run: composer install --prefer-dist --optimize-autoloader --no-interaction --no-progress + - run: vendor/bin/phpunit --testdox diff --git a/README.md b/README.md index b6005ad..e5058b8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Solana PHP SDK [![Latest Version on Packagist](https://img.shields.io/packagist/v/tightenco/solana-php-sdk.svg?style=flat-square)](https://packagist.org/packages/tightenco/solana-php-sdk) -[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/tighten/solana-php-sdk/run-tests?label=tests)](https://github.com/tighten/solana-php-sdk/actions?query=workflow%3Arun-tests+branch%3Amaster) +[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/tighten/solana-php-sdk/run-tests?label=tests)](https://github.com/tighten/solana-php-sdk/actions?query=workflow%3Arun-tests+branch%3Amain) Simple PHP SDK for Solana.