Se añadió un conjunto de tests en composer.json, llamado tests-readon… #12
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 | |
| on: | |
| push: | |
| branches: | |
| - master # Ejecuta pruebas al hacer push en la rama 'master' | |
| env: | |
| env_var: ${{ vars.ENV_CONTEXT_VAR }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: ['8.3'] # Puedes cambiar las versiones según necesites | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v3 | |
| - name: Setup PHP ${{ matrix.php-version }} | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} # Configura la versión de PHP desde la matriz | |
| extensions: curl, mbstring, intl, xdebug | |
| tools: composer | |
| - name: Install Composer dependencies | |
| run: composer install --no-progress --no-suggest | |
| - name: Run PHP tests dte temp | |
| env: | |
| LIBREDTE_HASH: ${{ secrets.LIBREDTE_HASH }} | |
| LIBREDTE_RUT: ${{ vars.LIBREDTE_RUT }} | |
| run: | | |
| composer tests-dte | |
| composer tests-cobros | |
| - name: Upload PHPUnit result report | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tests-testdox-php_${{ matrix.php-version }}.txt | |
| path: var/tests-testdox.txt | |
| - name: Upload Coverage Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tests-coverage-php_${{ matrix.php-version }}.txt | |
| path: var/tests-coverage.txt | |
| - name: Display PHP version | |
| run: php -v |