diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..27efc7d --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,27 @@ +name: PHP Composer + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: ['7.1', '7.2', '7.3', '7.4'] + name: Build PHP version ${{ matrix.php-versions }} + steps: + - uses: actions/checkout@v2 + + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run test suite + run: composer test diff --git a/README.md b/README.md index 7d2497e..684c3de 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # MTA:SA PHP SDK -[![Build Status](https://dev.azure.com/multitheftauto/mtasa-php-sdk/_apis/build/status/multitheftauto.mtasa-php-sdk?branchName=master)](https://dev.azure.com/multitheftauto/mtasa-php-sdk/_build/latest?definitionId=1&branchName=master) You can access the MTA Web Interface from almost any programming language that can request web pages. PHP can do this very easily. diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 1256709..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,20 +0,0 @@ -# https://docs.microsoft.com/azure/devops/pipelines/ecosystems/php -pool: - vmImage: 'ubuntu-latest' - -variables: - phpVersion: 7.1 - -steps: - - script: | - sudo update-alternatives --set php /usr/bin/php$(phpVersion) - sudo update-alternatives --set phar /usr/bin/phar$(phpVersion) - sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(phpVersion) - sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(phpVersion) - sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(phpVersion) - php -version - displayName: 'Use PHP version $(phpVersion)' - - script: composer install --no-interaction --prefer-dist - displayName: 'composer install' - - script: composer test - displayName: 'Run tests'