feat: adiciona params faltantes no PaymentTransaction #47
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.4 | |
| 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 | |
| URL="https://github.com/codeclimate/test-reporter/releases/download/${CC_TEST_REPORTER_VERSION}/test-reporter-linux-amd64" | |
| echo "Downloading test-reporter from: $URL" | |
| curl -fsSL "$URL" -o ./cc-test-reporter || { echo "curl failed"; exit 1; } | |
| # quick sanity checks to ensure we got a binary, not an HTML page | |
| file ./cc-test-reporter | |
| if file ./cc-test-reporter | grep -qi 'ELF'; then | |
| chmod +x ./cc-test-reporter | |
| else | |
| echo "Downloaded file is not an ELF binary. Contents:" | |
| head -n 40 ./cc-test-reporter | |
| exit 1 | |
| fi | |
| - 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 $? |