feat: adiciona params faltantes no PaymentTransaction #48
This file contains hidden or 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 Tests | |
| on: | |
| push: | |
| branches: [ "master", "develop" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| permissions: | |
| contents: read | |
| env: | |
| # pin a Code Climate test-reporter release to avoid "latest" redirects returning HTML | |
| CC_TEST_REPORTER_VERSION: v0.11.1 | |
| jobs: | |
| phpunit: | |
| runs-on: ubuntu-latest | |
| env: | |
| CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_ID }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '7.4' | |
| coverage: xdebug | |
| - name: Install Composer Dependencies | |
| run: composer install --no-progress --prefer-dist --optimize-autoloader | |
| - name: Download Code Climate test-reporter | |
| run: | | |
| set -euo pipefail | |
| echo "Downloading test-reporter from CodeClimate v${CC_TEST_REPORTER_VERSION}" | |
| curl -fsSL "https://github.com/codeclimate/test-reporter/releases/download/${CC_TEST_REPORTER_VERSION}/artifacts.tar.gz" -o artifacts.tar.gz || { echo "curl failed"; exit 1; } | |
| # Extract the linux-amd64 binary from the artifacts | |
| tar -xf artifacts.tar.gz ./artifacts/bin/test-reporter-${CC_TEST_REPORTER_VERSION#v}-linux-amd64 | |
| mv ./artifacts/bin/test-reporter-${CC_TEST_REPORTER_VERSION#v}-linux-amd64 ./cc-test-reporter | |
| chmod +x ./cc-test-reporter | |
| rm -rf artifacts.tar.gz artifacts/ | |
| # Verify the binary works | |
| ./cc-test-reporter --version | |
| - name: Code Climate before-build | |
| run: ./cc-test-reporter before-build | |
| - name: Run Tests | |
| run: php vendor/bin/phpunit --color --testdox --coverage-clover clover.xml tests | |
| - name: Send Report | |
| run: ./cc-test-reporter after-build -t clover --exit-code $? |